Missing something

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
joeyfoley
Forum Newbie
Posts: 1
Joined: Sat Sep 25, 2004 11:57 am

Missing something

Post by joeyfoley »

I am trying to use the method="get"
seems to be showing variables in address, not on page though.

hereis code for welcome

Code: Select all

<?php  
	echo( "Welcome to our Web site,$firstname $lastname!" );
?>
hereis code for calling

Code: Select all

<HTML>
<HEAD>
	<TITLE>Today's Date
</TITLE>
</HEAD>
<BODY>
	<P>Today's Date (according to this Web server) is
	
	<?php
		echo( date("l, F dS Y.") );
	?>


<FORM NAME="form1" ACTION="welcome.php" METHOD=GET>
	First Name: <INPUT TYPE=TEXT NAME="firstname"> <BR>
	Last Name: <INPUT TYPE=TEXT NAME="lastname"> 
	<INPUT TYPE=SUBMIT VALUE="ENTER">
</FORM>


</BODY>
</HTML>
thanks from a total newbie
apologies if format is not correct
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

your code is relying on register globals to be on, when they are not. So, $firstname and $lastname don't exist. but $_GET['firstname'] and $_GET['lastname'] do.
Post Reply