20 Apr
In normal Ajax post we send form in serialize way, but suppose you want to send some extra value to you php page then you can do as below.
data: $('#youForm).serialize() + "&extraData=" + extraDataValue
For example you are using ajax for submitting your form
$.ajax({ type: 'POST', url: "your_php_page.php", data: $('#youForm).serialize() + "&extraData=" + extraDataValue, // extra value with serialize form success: function(data){ //do action on success of function } });
For more help you can visit http://api.jquery.com/serialize/
I am a software engineer who specializes in Internet applications. I have worked with a wide variety of technologies and programming languages to open source LAMP environments. I have more than 6 years of object-oriented programming experience and am highly proficient in ActionScript, PHP, MYSQL, JavaScript, Jquery and a multitude of other technologies used in modern web applications.
Follow me
Latest posts by Rajeev Achra (see all)
- Jquery webcam plugin - June 19, 2016
- How To Add and Delete Users on a CentOSServer - June 5, 2016
- How To Set Up vsftpd on CentOS 6 - June 5, 2016