I created a simple html form with only one textbox & a submit button as
follows:

<form method=post action="form1.php">
<input type=text name="fname">
<input type=submit value="SUBMIT">
</form>

This is form1.php

<html>
<body>
Hi <?php echo $fname; ?>
</body>
</html>

But I don't know why I am not getting the output. I am just getting the
following error:

Notice: Undefined variable: fame in d:\inetpub\wwwroot\php\Form1.php on line
3

In order to pass the Form values to a PHP page, I went through 3-4 tutorials
on the web & all showed this way only to collect the form values as what I
have done but still I am getting the error. It's damn frustrating when even
after just copying & pasting the code from the tutorial & then running it I
get an error. I even tried the above using print($fname) but without any
luck. But if I include the following line in the PHP code before the above
PHP line

<?php $fname="Arpan"; ?>

the code gets executed perfectly !!!

Thanks,

Arpan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to