in this i am sending the values to adduser.php and after execution completed inserted id will send to index.php.please give the comments
index.php
$.ajax({
type: "POST",
url: "adduser.php",
data: "name="+ name +"&email="+ email,
success: function(msg,usrid){
alert(msg);
}
})
adduser.php
$q = mysql_query("INSERT INTO `user_login`(fname,email) VALUES('$fname','$email')");
$id=mysql_insert_id();
echo '0';
echo $id;
contact.php
this response id can be user for next page url as like window.location.href="contact.php?id=$id";if any other option to pass the id value to contact.php