I am currently in the process of making a Newsletter Builder, the current code is as follows...

(This is my first attempt at jQuery ajax)

HTML
HTML Code:
<div id="buildBox"></div>
...
<div id="buildNow">Build</div>
PHP (newsletter_build_ajax.php)
PHP Code:
<?php 
if($_POST['submit']){
    
$buildBox $_POST['build'];
    
$file "/home/newsletter/current.html";
    
$fp fopen($file'w');
    
fwrite($fp,$buildBox);
    if(
fclose($fp)){
        echo 
"ok";
    } else {
        echo 
"error";
    }
}

?>
jQuery
HTML Code:
// AJAX BUILD
	var $buildNow = $("#buildNow");
	$buildNow.on("click", function(){
		$buildNow.css("border-color", "rgba(0,204,255,1)");
		$buildNow.text("Building...");
		$.ajax({
			url:"_includes/newsletter_build_ajax.php",
			type: 'POST',
			data: { 'build': $buildBox.html() , 'submit' :''},
			dataType:"html",
			success: function(data, status){
				if(data == "ok"){
					$buildNow.css("border-color", "rgba(0,255,0,1)");
					$buildNow.text("Built!");
					
				}
			},
			error: function(xhr, desc, err){
				console.log(xhr);
				console.log("Details: " + desc + "\nError: " + err);
				$buildNow.css("border-color", "rgba(255,0,0,1)");
				$buildNow.text("Build Failed");
			}
		}); // END AJAX
	});
I just simply want to write the contents of #buildBox to the current.html file, when the Build div is clicked.

But my AJAX simply won't execute, Just changes text to "Building..." and stays.