RE: [PHP-DB] SESSIONS
| From: | Dennis Cole | Date: | Wed, 14 Feb 2001 20:23:23 +0000 |
| Subject: | RE: [PHP-DB] SESSIONS | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25916@lists.php.net to get a copy of this message | ||
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: [PHP-DB] 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