My Goal is get two drop down values and 1. pass them to action
and 2. pass them to $_POST
to next .php
page. In short i want to select action
php page using drop-down
menu.
What i am doing wrong here, whatever i select from page
drop-down menu it always default select page1.php
<html>
<body>
<select name='page'>
<option value='page1.php'>page1</option>
<option value='page2.php'>page2</option>
</select>
<form name="page" method="post" action="<?php echo $_POST['page']; ?>">
<?php
// DB connection info:
include 'db_connection.php';
$sql = "SHOW tables";
$result = mysql_query($sql);
echo "<select name='param1'>";
while ($row = mysql_fetch_array($result)) {
echo "<option value='" . $row['Tables_in_radius'] . "'>" . $row['Tables_in_radius'] . "</option>";
}
echo "</select>";
?>
<input type="submit" value="send">
</form>
<?php
if(isset($_POST['param1'])){
}
?>
</body>
</html>