Mike
Mike

Reputation: 476

HTML form post or Ajax post

I have a form which has many inputs and will need to be broken up and sent to different databases. What would be the more efficient way to do this, with a regular HTML post to a PHP function or posting to an AJAX(or JQUERY?) function. I don't know much of all the options available for posting and processing data, but if clarification is needed please ask.(If it matters, my project is written in PHP)

Upvotes: 1

Views: 100

Answers (2)

ajay agrawal
ajay agrawal

Reputation: 247

If your HTML contains inputs such that the values are independent to each other then sending a separate request is good else AJAX is good option.

Upvotes: 3

Dmytro Zarezenko
Dmytro Zarezenko

Reputation: 10686

If you have a big comprehensive form the better way is divide it on small parts and code step-by-step form submission. In this case you can store data with simple PHP request but validate form fields input with AJAX verification.

Upvotes: 2

Related Questions