This is Test.html
---------------------------------------------
<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=GET ACTION="text.php">
Who is your favourite author?
<INPUT NAME="Author" TYPE="TEXT">
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
--------------------------------------------
And this is text.php
--------------------------------------------
<HTML>
<HEAD></HEAD>
<BODY>
Your favorite author is:
<?php
echo $Author;
?>
</BODY>
</HTML>
--------------------------------------------
When i run this code, i get Undefined variable Author in text.php. Do anyone knows why?
thanks
-Kenny.
Simple HTML Form Problem.
Moderator: General Moderators
It works fine for me...
Erm im not sure why it wont work for you....
Example:
http://www.imahosting.com/dale/php/spKenny/
Erm im not sure why it wont work for you....
Example:
http://www.imahosting.com/dale/php/spKenny/
You should read 'sticky' posts before posting this 
And your code should look like this
or like that
depending on a PHP version you use...
And your code should look like this
Code: Select all
<HTML>
<HEAD></HEAD>
<BODY>
Your favorite author is:
<?php
echo $HTTP_GET_VARSї'Author'];
?>
</BODY>
</HTML>Code: Select all
<HTML>
<HEAD></HEAD>
<BODY>
Your favorite author is:
<?php
echo $_GETї'Author'];
?>
</BODY>
</HTML>- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
The sticky post in question that you really should have read before posting is:
http://www.devnetwork.net/forums/viewtopic.php?t=511
Mac
http://www.devnetwork.net/forums/viewtopic.php?t=511
Mac