Form variables not available

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

David Anderson
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Feb 09, 2003 8:23 am

Form variables not available

Postby David Anderson » Sun Feb 09, 2003 8:36 am

I get the following when trying to use form variables. I have only just started on PHP, so I assume it is something simple I have missed...
Any help would be very gratefully received.

Regards, David
======
Output -
Your favourite author is:
Notice: Undefined variable: Author in C:\Inetpub\wwwroot\WOSIIS\Guest\text.php on line 10
======
text.htm -
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="get" action="text.php">
Who is your favourite author?
<INPUT NAME="Author" type="text"
<BR>
<BR>
<INPUT type="submit"
</form>
</body>
</html>
==========
text.php -
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Your favourite author is:
<?php
echo $Author;
?>
</body>
</html>

David Anderson
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Feb 09, 2003 8:23 am

Additional information

Postby David Anderson » Sun Feb 09, 2003 8:42 am

This happens under Windows XP, IIS5.1 PHP4.3, but works on Linux, Apache 1.3, PHP 4.23


Return to “PHP coding => General”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest