Thanks for reply.I thought session_register() method is deprecated.However I have changed the script to be like the following,the session value still can't pass over.
reservation.php
<?php for ($i = 1; $i <= 3; $i++) {
$date = date('D d\t\h M', strtotime('+' . $i . ' days'));?>
<option value="<?=$date;?>"><?=$date;?></option>
<?php } ?>
reservation2.php
<?php
session_start();
$_SESSION['my_date'] = $_POST['rDate'];
.........
..........
<tr>
<label>You selected <?= $_SESSION['my_date']; ?>!</label>
</tr>
?>
In the first page there I included a javascript to validate null selection of drop down menu,I suspect that something might went wrong here.
<script language="JavaScript" type="text/JavaScript">
function validateDrop(date)
{
var returnStatus = 1;
if (date.rDate.selectedIndex == 0) { //if user didn't select any date
alert("Please select a date!");
returnStatus = 0;
};
if (returnStatus) { // if date is selected
window.location='reservation2.php'
}
}
</script>
...................
..................
<form action="reservation2.php" method="post" name="reservation" id="reservation">
....................
...................
<input name="continue" type="button" id="continue4" value="Continue" onclick="validateDrop(document.reservation)">