so I have a div called #preview
which is just a preview of a survey. I want to send the html value of the div and send it to a GET variable valled content
so i can use it in php. here's what i've done:
$('#create-button').click(function(event){
event.preventDefault();
$.ajax({
url:'../php/CheckForExistingSurveys.php',
data:{content: $('#preview').html()}
});
});
in my php script:
<?php
if(isset($_GET['content'])){
echo 'content is set';
}
?>
whenever i click the #create-button
i dont see the get variable being initialized in the url. All I want to know is how i can get the html value of the #preview
div and send it to a get variable so that I can make queries and what not in the CheckForExistingSurveys.php
file.