Can somebody please tell me what I am doing wrong in my html file.
In my php script, I have set the $_SESSION array successfully. I have verified this.
However, when I read the $_SESSION array in the html page to which the user is directed, it reads the $_SESSION as having a NULL value.
The start of my html file is as follows:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="ExpressionInterest" method="post" action="sendmail.php">
<blockquote>
<p align="center"><img src="Formtitle.jpg" width="852" height="286" align="middle"></p>
<p align="center"><strong>REGISTER YOUR INTEREST </strong></p>
<p align="center">If you would like to register your interest in attending this event, please complete and </p>
<p align="center">return this form via fax to Norrie Keane at the following number: +353 (0)93 43887. </p>
<p align="center"><strong>Title </strong>:
<select name="Title" size="1" tabindex="1" dir="ltr">
<option> </option>
<option>Dr.</option>
<option>Mr.</option>
<option>Mrs.</option>
<option>Miss.</option>
</select>
<strong> Name </strong>:<strong>
<?php
//var_dump($_SESSION['Name']);?>
<input name="Name" type="text" value="<?php if(isset($_SESSION['Name'])){
echo $_SESSION['Name'];}
else
echo($_POST['Name']);?>" tabindex="2" size="29">
It is the final few lines which try to read the $_SESSION variable but it returns a NULL.
Any ideas why??????? In despair!!!!!!