I'm a little confused about session variables... the following code example displays an error if the text entered does not equal "test" but the form field value is blanked out. I'm pretty sure I need to save the value in a session variable but I'm confused as to how to do it.
<HTML>
<HEAD>
</HEAD>
<BODY>
<?php
if ($submit) {
if ($text == "test") {
$error="N";
}else{
$error="Y";
}
} else {
}
?>
<form method="post" action=" <?php echo $PHP_SELF ?> ">
<INPUT TYPE="text" NAME="text" SIZE="4" MAXLENGTH="4">
<input type="submit" name="submit" value="Test">
</FORM>
<?php
if ($error == "Y") {
echo"only "test" is a valid value";
}
?>
</BODY>
</HTML>
Thanks for any help