Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple form problem

Status
Not open for further replies.

EchoAlertcom

IS-IT--Management
Oct 8, 2002
239
US
Hi,

I am just learning PHP and am stuck on something that is embarrasingly simple.

Form Page:
Code:
<html><head></head>
<body>

<form Method=&quot;post&quot; action=&quot;text.php&quot;>
Who is your favorite author?<br>
<input name=&quot;Author&quot; type=&quot;text&quot;>
<br><br>
<input type=&quot;submit&quot;>
</form>

</body></html>

Form Processing Page:
Code:
<html><head></head>
<body>
Your favorite author is:
<?php
	echo $Author;
?>
</body>
</html>

I have tried with Get and Post. When I run it i get the error:
Notice: Undefined variable: Author in C:\Inetpub\ on line 5

Thank you for your help.

Sincerely,
Steve
 
probably register globals are off...
so you would have to use
$_GET['Author']
or
$_POST['Author']
 
Thank you.

How do I turn register globals on? And Should I turn them on?

Cheers,
Steve
 
if its your server, you can do so by editing php.ini
register_globals = on/off
for security reasons they are off since php 4.1 i think
so to be compliant with a later hoster, you should make your code register globals = off safe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top