I created a web form. On the form, I created a hidden field called "submitted" ... to check and see if the form was submitted or not. So, when the user clicks submit, and are redirected back to the same page, I can tell the page to run the "email code" that sends the mail to me ...
The problem is, whenever the form is submitted, none of the variables are transfered....
At the top of the page, I placed the following code... $submitted refers to the hidden field, and $theirname refers to the text field where the user enters their name...
if(isset($submitted)) { echo "sub 1"; echo $theirname; } else { echo "sub no"; echo $theirname; }
When I go to the page initially OR when I submit the form, I get this error message at the top of the page...
sub no
Notice: Undefined variable: theirname in C:\OH\faqs.php on line 83
Once the page is submitted, the hidden field called "submitted" should be transfering a value of 1 to the page. But it isn't. NOTE: I know why I am getting the notice. I just need to know why the variables aren't transfering.
In case you need to see the initial values of my form code...
<form action="faqs.php" method="post" enctype="multipart/form-data">
<input name="submitted" type="hidden" id="submitted" value="1">
<!-- then comes the rest of the form -->
Thanks for your help. Please keep your answers in layman's terms, as I'm fairly new to php. And, if I have to tell my webhost to change a setting, I need to be able to tell them in a way they understand. Thanks!