Form Handling
Posted: Fri May 24, 2002 8:20 am
Right im new to php, and i have been doing tutorials on a website to learn php, well now im upto form handling and this is what i do
I create a document called form.html and write this code:
<form action="FormHandler.php" method="POST">
<input type="text" name="FirstElement">
<input type="text" name="SecondElement">
<input type="submit" value="Send form">
</form>
Then i create a php file called FormHandler.php and write this code:
<?php
echo($FirstElement);
echo($SecondElement);
?>
So then i run the Form.html file, then submit it. Then i get this error :
Notice: Undefined variable: FirstElement in d:\inetpub\monster.2ya\learn\FormHandler.php on line 2
Notice: Undefined variable: SecondElement in d:\inetpub\monster.2ya\learn\FormHandler.php on line 3
What am i doing wrong. Thanx
I create a document called form.html and write this code:
<form action="FormHandler.php" method="POST">
<input type="text" name="FirstElement">
<input type="text" name="SecondElement">
<input type="submit" value="Send form">
</form>
Then i create a php file called FormHandler.php and write this code:
<?php
echo($FirstElement);
echo($SecondElement);
?>
So then i run the Form.html file, then submit it. Then i get this error :
Notice: Undefined variable: FirstElement in d:\inetpub\monster.2ya\learn\FormHandler.php on line 2
Notice: Undefined variable: SecondElement in d:\inetpub\monster.2ya\learn\FormHandler.php on line 3
What am i doing wrong. Thanx