RE: SESSIONS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You need to register you varible first with the session

-----Original Message-----
From: David Rice [mailto:haloplayer@hotmail.com]
Sent: Tuesday, February 25, 2003 3:10 PM
To: php-db@lists.php.net
Subject:  SESSIONS



Here's something i can't get working it won't go to the last clause of this
page.... i don't think it can set the session variable

anyone see what im doing wrong? i need more caffeine to get my brain fired
up today lol..

=======================================

<? session_start();?>
<HTML>
<head>
</head>
<body>
<? if ( !$SUBMIT ){ ?>
	<form action="<? echo $PHP_SELF; ?>" method="post" name="TEST">
	<input name="name" type="text" value="name" size="20" maxlength="20">
	<input name="SUBMIT" type="submit" value="SUBMIT">
	</form>

<?
	}
	elseif($SUBMIT){
		$_SESSION["name"] = $HTTP_POST_VARS["name"];
		?>
		<a href="<? echo $PHP_SELF; ?>"> next </a>
	<?
	}
	elseif( ( $SUBMIT ) && (  isset ( $_SESSION["name"] ) ) ) {
		echo $_SESSION["name"];
	}
	?>
</body>
</HTML>




_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger
http://messenger.msn.co.uk


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


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux