Submission of forms

I was wondering if someone would disable javascript, how my form would be submitted for verification using Php. Another thing that I would like to know is how I can do something like this if a person presses the submit button and PHP checks for several fields, if one of the fields is invalid, I return an error in the div and if there is no error, the script works. I know how to execute jquery ajax, mysql and stuff, but sending data if javascript is disabled is a bit confusing for me. I mean that I will not offer any form actions, as all this will work. Hope I made some sense, thanks.

// edited

Well, I got some answers, thanks to the fact that it helped me understand how it all works. My last addition to the question: if I submit the form without any action, it will be like submitting to myself. Will this cause the page to reload? and finally, how can I satisfy the pitch to do both things? First, check through ajax, and if everything sends and executes a php script normally, even if javascript is disabled?

+3
source share
3 answers

Welcome to the HTML site, you can find out about FORM and CONFIRMATION .

AJAX , AJAX , . (, Javascript ), .

0

AJAX, PHP . , , .

PHP - , SQL- . .

? .

0

I would add hidden input to your form whose default value is, say, 0. And, using JavaScript, I would change its value, say 1. Thus, when submitting the form, if the input value is still 0, the user does not have JavaScript enabled (or his browser simply does not support it), and thus his input must be verified on the server side.

0
source

All Articles