I have an html form with multiple text fields that when submit is pressed, a php file processes the form, storing submitted info into mysql database, then sending email with same data. I would like to know how to:
1) make some fields required, check the form to make sure that the required fields are filled out and that any filled out field has "good" data,
2)if field checks are "good" then store into mysql database, if not, go back to form and let user know what problem is,
3)if field check is good, and data stored into database, then email the data.
Currently, the form gets filled out (or not) then when submit is pressed it automatically stores the data and sends an email. I would like to make it to where no storage happens unless the form is correctly filled out (and safely), and no email unless data is successfully stored.
I can re-post the form and php processing file if necessary, or you can look in
this thread.
The issue from that thread has been resolved, and now I would like to go a little further with the same form.
-> The current version of the php file is slightly different from the one posted there, as I have applied the suggested tips and re-saved, but for what I am now seeking help with it would be irrelevant.
Any help appreciated :)