Hi,
I’m tyring to run a session over three pages:
My first page (below) is a simple .html form where there are two select boxes, which I select values from:
first.html
<html>
<head>
<title>>> :: Please select destination & Arrival ::</title>
<style type='text/css'>
body
{
scrollbar-3dlight-color:#6699FF;
scrollbar-arrow-color:#FFFFFF;
scrollbar-base-color:#FFFFFF;
scrollbar-darkshadow-color:#FFFFFF;
scrollbar-face-color:#0033CC;
scrollbar-highlight-color:#6699FF;
scrollbar-shadow-color:#FFFFFF
}
</style>
<link rel="stylesheet" href="ssheet.css">
</head>
<body bgcolor="#6699FF">
<?php echo $original; ?>
<div align="center">
<p><img src="images/atlantica_airways.jpg" width="745" height="86"></p>
<table border="0" cellpadding="0" cellspacing="0" width="745">
<!-- Table Row of top round table begins -->
<tr>
<td width="22"><img src="images/right_top.jpg" width="22" height="22"></td>
<td width="724" bgcolor="#FFFFFF"></td>
<td width="10"><img src="images/left_top.jpg" width="22" height="22"></td>
</tr>
<!-- Table Row of top round table ends -->
<!-- Table Row of middle section of round table begins -->
<tr>
<td width="22" bgcolor="#FFFFFF"></td>
<td width="724" bgcolor="#FFFFFF" align="center">
<p class="heading" align="left"><img src="images/plane_image.jpg" width="150" height="79" align="right" vspace="6" hspace="6">Atlantica-airways
- please select your destination & arrival point...</p>
<p align="left">Please select the airport that you are destination airport
and your arrival airport from the boxes below</p>
<p align="left">When you have selected these details, please hit submit</p>
<form method="post" action="one_show_details.php">
<table width="100%">
<!-- First Row for original departure details starts -->
<tr>
<td width="4%"><img src="images/1.jpg" width="20" height="20"></td>
<td width="50%"><b>Please Select the Airport you are leaving from:</b></td>
<td width="46%">
<select name="selorigin" class="box">
<option value="#" selected>Please Select...</option>
<option value="Birmingham">Birmingham</option>
<option value="Blackpool">Blackpool</option>
<option value="Bournemouth">Bournemouth</option>
<option value="Bristol">Bristol</option>
<option value="Cambridge">Cambridge</option>
<option value="Coventry">Coventry</option>
<option value="Doncaster">Doncaster</option>
<option value="Exeter">Exeter</option>
<option value="Leeds">Leeds</option>
<option value="Liverpool">Liverpool</option>
<option value="London Gatwick">London Gatwick</option>
<option value="London Heathrow">London Heathrow</option>
<option value="London Luton">London Luton</option>
<option value="London Stanstead">London Stansted</option>
<option value="Manchester">Manchester</option>
<option value="Teeside">Teesside</option>
<option value="Newcastle">Newcastle</option>
<option value="Norwich">Norwich</option>
<option value="Plymouth">Plymouth</option>
<option value="Southampton">Southampton</option>
</select>
</td>
</tr>
<!-- First Row for original departure details ends --> <!-- First Row for destination details starts -->
<tr>
<td width="4%"><img src="images/2.jpg" width="20" height="20"></td>
<td width="50%"><b>Please Select the Airport you are arriving at:</b></td>
<td width="46%">
<select name="seldest" class="box">
<option value="#" selected>Please Select...</option>
<option value="Birmingham">Birmingham</option>
<option value="Blackpool">Blackpool</option>
<option value="Bournemouth">Bournemouth</option>
<option value="Bristol">Bristol</option>
<option value="Cambridge">Cambridge</option>
<option value="Coventry">Coventry</option>
<option value="Doncaster">Doncaster</option>
<option value="Exeter">Exeter</option>
<option value="Leeds">Leeds</option>
<option value="Liverpool">Liverpool</option>
<option value="London Gatwick">London Gatwick</option>
<option value="London Heathrow">London Heathrow</option>
<option value="London Luton">London Luton</option>
<option value="London Stanstead">London Stansted</option>
<option value="Manchester">Manchester</option>
<option value="Teeside">Teesside</option>
<option value="Newcastle">Newcastle</option>
<option value="Norwich">Norwich</option>
<option value="Plymouth">Plymouth</option>
<option value="Southampton">Southampton</option>
</select>
</td>
</tr>
<!-- First Row for destination details ends -->
</table>
<div align="left"><br />
<input type="submit" name="Submit" value="Submit" class="button" />
<input type="reset" name="Reset" value="Reset" class="button" />
</div>
</form>
</td>
<td width="10" bgcolor="#FFFFFF"></td>
</tr>
<!-- Table Row of middle section of round table ends -->
<!-- Table Row of bottom round table begins -->
<tr>
<td width="22"><img src="images/right_bottom.jpg" width="22" height="22"></td>
<td width="724" bgcolor="#FFFFFF"></td>
<td width="10"><img src="images/left_bottom.jpg" width="22" height="22"></td>
</tr>
<!-- Table Row of bottom round table ends -->
</table>
</div>
</body>
</html>
I then hit submit to take me through to a php page where I create a session to POST the values selected on the page (as shown here) which works:
<? $_SESSION['original'] = $_POST[selorigin]; ?>
<? $_SESSION['destination'] = $_POST[seldest]; ?>
<html>
<head>
<title>output</title>
</head>
<body bgcolor="#FFFFFF">
<p>You have chosen to leave from : <?php echo $_POST[selorigin] ?><br />
You will be arriving at : <?php echo $_POST[seldest] ?></p>
<p><a href="three.php"><img src="images/here_to_continue.jpg" width="250" height="20" border="0"></a></p>
<p><a href="javascript: history.go(-1)"><img src="images/here_to_modify.jpg" width="250" height="20" border="0"></a></p>
</body>
</html>
Now this is where I am confused. When the manual button I created is clicked on to take me through to this page (below) it does not output anything?
<? session_start(); ?>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<?php echo $_SESSION['original'] ?>
</body>
</html>
Any ideas why my third page does not hold these values from the previous page in the session and output them on the screen?
Thanks
Chris