SESSIONS
| From: | David Rice | Date: | Tue, 25 Feb 2003 20:10:19 +0000 |
| Subject: | SESSIONS | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-25915@lists.php.net to get a copy of this message | ||
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