Ajax Request |
[eluser]uptime[/eluser]
[quote author="Nutan Lade" date="1219781044"]I am using Ajax library.[/quote] Which one?
[eluser]Nutan Lade[/eluser]
In Ajax for CI. prototype.js library I am using.
[eluser]mdowns[/eluser]
You need to check that the url is the same url you tried it manually. Code: var url = "<?=base_url()?>index.php/gadgets/addMovie/"+movieId;
[eluser]Nutan Lade[/eluser]
http://localhost/Gadgets/index.php/gadgets/addMovie/10 this was the url I tried manually and the value i got is addMovie
[eluser]mdowns[/eluser]
Can you explain more what is happening with the Ajax call then.
[eluser]Nutan Lade[/eluser]
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
[eluser]mdowns[/eluser]
Try one of these (note $_POST instead of $_post): [quote author="inparo" date="1219696545"]They'll be in the $_POST array, so you have two options: Code: // Conventional PHP
[eluser]Nutan Lade[/eluser]
Sorry dude thanks for ur help and suggestions.But it was returning null value only.So now I am changing the code and sending the value through url only.Although it is not good to do but I am doing it.
[eluser]Nutan Lade[/eluser]
can u tell me how to remove single quotes etc before inserting values into db.
|
Welcome Guest, Not a member yet? Register Sign In |