Submit a JQuery Mobile form via AJAX with PHP

I have a previous article on how to use JQuery Mobile (and PHP) to submit some data via AJAX. With a little modification you can take that code and make it so you can submit an entire form. Today I’ll show you how to do that.

Note: I did this sample code on an Ubuntu 10.10 Desktop system running nginx and PHP 5.3. I used JQuery Mobile alpha release 4. You can find out how to setup this particular instance here.

The PHP page is very simple and will listen for two incoming fields.

File name: callajax.php

The HTML5 page takes two values (first name and last name) and uses JQuery AJAX to send those serialized fields to the PHP page mentioned above. The results are then displayed.

Thanks for this post! Works fine for me. But i have problems with handling checkboxes in the PHP file. I need to know which checkbox is checked after the submission of the form. Can you give me a hint ?