Hi,
I have been unable to resolve my problem regarding the drop down menu on the form. I have never used PHP and MySQL before and never been programming before.
User is supposed to select option from drop down list lets say Option1, select dates From – To and when Submited redirected to Option1.php. When user selects Option2 redirected to Option2.php etc. It all works fine however i cannot pass the values for dates fields. I cannot even echo the dates on Option1.php page. It is not remembering the value of dates fields.
My index.html:
<?php
if(isset($_POST[‘menu’])){
$menu = $
header(“Location:$menu”);}
?>
<head>
<script type=”text/javascript” src=”calendar.js” language=”javascript”></script>
</head>
<body onload=”date_selector.init(window.document.forms[‘mainselec’]);”>
<form name=”mainselec” method=”post” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>
<select name=”menu”>
<option value=””></option>
<option value=”Option1.php”>1 Selected</option>
<option value=”Option2.php”>2 Selected</option>
</select>
<table><tr><td>
<input type=”button” value=”From” onclick=”date_selector.showDateSelector(‘minimumDate’);”>
<input type=”text” name=”minimumDate” value=”DD/MM/YYYY”>
<input type=”button” value=”To” onclick=”date_selector.showDateSelector(‘maximumDate’);”>
<input type=”text” name=”maximumDate” value=”DD/MM/YYYY”>
</td></tr></table>
<input type=”submit” name=”submit” value=”Submit”>
</form>
</body>
</html>
My Option1.php
<?php
echo $minimumDate;
echo $maximumDate;
?>
Please if anyone knows how this can be resolved i would really apprieciate it.