I have a form that has data that is parsed to a PHP file. I was wondering how to use the data that is also sent in the variable myData. If the form serializes then I can use the $_GET['add_album'], but how do I use myData in PHP? I want to echo the data in my PHP file. Here is my AJAX:
var div = document.getElementById("hidden_div");
var myData = div.textContent;
/*var pathh = '<?php echo $pathh ?>';*/
alert(JavaScriptAlert);
$.ajax
(
{
url:"add_album.php",
type: "GET",
data: {myData: myData, form: $('#form3').serialize()},
success:function(result)
{
alert(result);
}
}
);
and my PHP:
<?php
echo myData.'\\'$_GET['add_album']; //need to echo out the data inside the "myData" variable
mkdir(myData.'\\'$_GET['add_album']);
?>
add_albumbut change the index tomyData.echo myData.'\\'.$_GET['add_album'];, ditto mkdir you should be getting syntax errors, but may not see them