[eluser]uptime[/eluser]
[quote author="Nutan Lade" date="1219790109"]Here in the Ajax call I am sending a value userId.I need this value to enter into db.But when I am using $_post['userId'] I am getting an error and it is
Undefined index: userId[/quote]
First of all, you should use $_POST[] instead of $_post[] (uppercase).
If it still doesn't work, keep reading...
* Are you sure you're sending it as post (and not get)?
* Do you have that AJAX page online?
* Are you sure the field name is userId? (this is case-sensitive ! )
Add this line BEFORE that line in which you try to use "$_post['userId']":
Code:
var_dump($_POST); exit;
And show us the results.