I have a drop down menu with a few values and I want to make the page reload when a value has been selected BUT I also want that value to appear on the address link!
The problem is that, the address link, is already passing a value (from a previous page) and I can't make that value stay on the link after the reload...
An example of the address:
website/test.php?movieid=35
This is my code for the option list:
<select name="showing_date" onchange="window.location.href = 'test.php?date='+ this.options [this.options.selectedIndex].value +'&movieid=' + '<?php echo $movieid; ?>' ;">
<?php
$date = $result2;
while($date <= $result3) {
echo "<OPTION VALUE=\"".$date."\">".$date."</OPTION>";
$date = date('Y-m-d', strtotime(date("Y-m-d", strtotime($date)) . " +1 day"));
}
?>
</select>
The values in the drop down menu appear correctly.Now, after I select a value from the option list, I want that value to appear on the link. (the drop down menu has dates)
For example if I choose the date 2012-02-10 I want the link to be like that:
website/test.php?movieid=35&date=2012-02-10
I'm doing something wrong and I can't make BOTH of the values stay at the link!
If someone can help me it will be great!
Thank you!


Sign In
Create Account


Back to top









