bonez07 Posted August 25, 2008 Share Posted August 25, 2008 I know how to make a form, that's not the problem at all. My problem is the processing and validating part. I want to create two forms, one to request a quote and one to place an order. So what code will I be using to send the information submitted to any e-mail address, and how do I make sure that xyz mandatory fields are filled in? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/121159-processing-a-form/ Share on other sites More sharing options...
DeanWhitehouse Posted August 25, 2008 Share Posted August 25, 2008 learn PHP , and then you can do all of that. We are here to help you with the code, not create it. Here is the logic for your questions. Submit the form using $_POST or $_GET , then check the mandatory fields, by checking there field length or something similar , then validate the email address, and then process the data. Quote Link to comment https://forums.phpfreaks.com/topic/121159-processing-a-form/#findComment-624586 Share on other sites More sharing options...
bonez07 Posted August 25, 2008 Author Share Posted August 25, 2008 Oh ok. Thanks. One last question, what is the difference between Post and Get methods? I read some stuff on it, but I'm still not quite understanding. And in what cases would you use each method? Quote Link to comment https://forums.phpfreaks.com/topic/121159-processing-a-form/#findComment-625122 Share on other sites More sharing options...
snowman15 Posted August 25, 2008 Share Posted August 25, 2008 GET is where the form values are traveling through the URL. Example: http://www.website.com/index.php?sting=hello In this example, the form with the id of string, has a value of "hello". If i were to use php to process the data, i would use the php variable $_GET['string'] and it would have the value of "hello". POST is where the values are "hidden" and not gathered from the URL. example: http://www.website.com/index.php There is not ?string=hello at the end because it is a POST statement and the information coming from "underneath the table" for lack of better words. It does the same thing but the difference is where the information is being pulled from and is it being shown to the person on the website. obviously you wouldn't want to use GET for password fields. Stuff like that. Also you can use GET in links because if you click a link that has the URL of http://www.website.com/index.php?sting=hello, it can process the string variable because its already being carried through the URL Hope this helps a little bit! If it doesn't i suggest googleing POST GET PHP or something along those lines. There are tutorials out there! Happy PHPing Quote Link to comment https://forums.phpfreaks.com/topic/121159-processing-a-form/#findComment-625131 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.