Well, I just had another question.
It seems like I'm having trouble passing variables from forms to my php scripts.
For example, this is an extremely rudimentary script and yet it refuses to work in my case. No matter how many things I try, it's giving me the same, 'form data incomplete message'
First, we have an html form that looks like this:
Quote:
<html>
<form action=mypage.php method=post>
<input type = "text" name=email>
<input type=text name=first_name>
<input type=submit name=submit value="yes">
</form>
</html>
|
And mypage.php is:
Quote:
<?php
if (isset($submit) && $submit=="yes")
{
echo "Thank you for submitting your form.";
}
else {
?>
<h3>form data incomplete</h3>
<form action=mypage.php method = post>
<input type=text name = email>
<input type=text name=first_name>
<input type=submit name=submit value=yes>
</form>
<?php
}
?>
|
And it refuses to work. I had the same problem with a more complex form, and I had decided that I'd resolve the issue later.
As it seems now, I don't think I have any idea as to what's wrong with what.
Can anyone please help? Thanks in advance.
This is what I got when I checked apache's error_log:
I also changed the form method to GET and checked the variable names and everything seems ok. Why is it then that PHP is having issues with recognizing the variables? Help please!