I have a drop down box from which the user selects a value. I want to post this value to Map.php where it will be used. I currently have my form posting to Map.php which is fine - however, I want to navigate to index.php after the user has made their selection and clicked the button, rather than navigating to Map.php. I have looked for a solution to this, but they all appear to be for situations where you would be visiting the page that the data is posted to...
userInterface.php
<form name="formname" method="post" action="Map.php">
<div id='userList'>
<?php
//get constants for database
require("database.php");
// Opens a connection to a MySQL server
$connection = mysqli_connect ($server, $username, $password);
$query = "SELECT distinct user FROM route";
$result = mysqli_query($connection, $query);
echo '<select name="dropdown" style="width:400px;">';
$count = 1;
while($r = mysqli_fetch_assoc($result)){
echo "<option value =".$count.">".$r['user']."</option>";
$count++;
}
echo '</select>';
?>
<input type="submit" id="button" value="Get Started!" />
Map.php
$value = $_POST['dropdown'];
if($value==1){....