First of all, there is no code with me ... I'm gathering required data to start a project.
I will be having multiple <form>
s on a website which are all linked to the same PHP page, say for example to send email or add data to DB.
Now, I can build the forms, and the PHP page to send mail or add data to DB. BUT here is the point I need to know about ... If any of the forms call the PHP page, how can I know which one did to act accordingly?
Also, is it better to do double-validation to the form? I mean, client-side then server-side?
Since we are talking about validation, is it better to be, on client-side, JS or JQuery (I can write both)? And about the DB thing, how can I secure it?!! I mean, how can I assure that the user won't enter a PHP code to mess things up and how I can detect it.
I know this seems to be like general question or a discussion, but you will be helping me a lot. And frankly, I've been using this website for around 3 yrs now, and you guys helped me pass my grad project with a great grade :) So I'm willing to find answers here :)
Thanks all.