Jump to content

Processing A Form


bonez07

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.