How to test jQuery Ajax with php? -


I just tried to send some information to a php file using Jquery Ajax. Every time I click, I have to send some information to the PHP file.

  & lt; Script & gt; $ (Document) .ready (function () {$ ('# checkbox'). Click (function () {$ .ajax ({type: "POST", url: "test.php", data: "ffs = Somedata & amp;; Ffs2 = somedata2 ", succes: function () {warning (" some ");}});});}); & Lt; / Script & gt; & Lt; Body & gt; & Lt; Input type = "checkbox" name = "checkbox" id = "checkbox" & gt; & Lt; / Body & gt;  

The php file looks like this:

  & lt ;? Php echo $ _POST ['ffs']; ? & Gt;  

Now, I am going to post, (using firebug) I have not found any errors, but nothing happens in the php file, besides success never reached, So no warning has started. What should I do in a php file so that I can speed up the success and also see the information sent?

typo, change

  succes: function () {<  

to

  Success: work () { 

and to get feedback from PHP

< Pre> success: function (data) {warning (data); }


Comments