I am facing a problem in passing parameters with ajax URL. I think the error is in parameters code syntax. Please help.
var timestamp = null;
function waitformsg(id,name) {
$.ajax({
type:"Post",
url:"getdata.php?timestamp="+timestamp+"uid="+id+"uname="+name,
async:true,
cache:false,
success:function(data) {
});
}
I am accessing these parameters as follows
<?php
$uid =$_GET['uid'];
?>
Why are you combining GET and POST? Use one or the other.
php:
Or, just format your request properly (you’re missing the ampersands for the get parameters).