i cant seen to get the php sessions to work, im trying to create a form that saves the data then put its against regular expressions to verify its legit information. at the moment im trying to figure out how to get the sessions to register but i cant figure it out, please help. im new to sessions
<?php session_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>regex</title>
</head>
<body>
<?php
$_SESSION['fname']=$fname;
$ufname = $_SESSION['fname'];
print<<<form
<form method="post" action="">
form;
print<<<firstname
First Name:
<input type="text"
name="fname"
value="$fname">
firstname;
print<<<submit
<input type="submit">
submit;
print "</form>";
if($fname == NULL){
print "lets go";
}else{
print "good";
}// end if
print "$ufname";
$_SESSION['ufname'] = $ufname;
?>
</body>
</html>