Originally Posted by sheerjeenyus
Okay another question.... in my product.html, I have "form id="Order Form" action="products.php" method="post""
Is that correct? So whatever info they put in on my Products.html, the info will be posted at products.php?
You'll get a lot further with all of this if you read the post/information given to you already and use that to continue learning yourself - doing this yourself would make up for the classes you missed
For php it is bad design to configure apache to forward all html pages to the php processor as not ever html file will have php code into it to process and it's just extra overhead.
This is what you want to do to make this dead simple, all in one file:
// check to see if the $_POST var is set that we're looking for
echo "Thanks for your submission!<br />";
echo "Your name as entered: '" . $_POST["txtName"] . "'<br /><br />";
echo "Click <a href='index.php'>here</a> to re-enter data into the form.";
else // else if it's not set show the form
Enter your name: <input type="text" id="txtName" value="" /><br />
<input type="submit" id="btnSubmit" value="Submit" />
Now please excuse the code above, I haven't written PHP in over 2 years and I'm sure it shows.... I'm hoping it's still correct
The html form is extremely barebones, I'm leaving it up to you to enhance what I've given you since it's your assignment and all
Also for any tag in html do not use spaces e.g.:
<form id="This is an ID">
Very bad design form, use camel casing or a derivative
Edited by xyexz - 3/18/13 at 6:56pm