What is the actual deal in the Data part ?
<form id="form" name="form">
<input type="text" name="textname" id="textname">
<input type="button" name="submit" id="submit" onclick="post();">
</form>
function post()
{
var textname = $('#textname').val();
$.ajax
({
url: 'post.php',
data: {testurl:textname},
type: "POST",
success: function (data)
{
$('#test').html(data);
console.log(data);
}
});
}
And the post.php
<?php
echo "test";
$testurl = $_POST['textname'];
echo var_dump($testurl);
?>
Echo Test is working but Output for the var_dumb is NULL string(0) - Empty String