I am having a problem of getting a variable passed from one page to another. On the first page there is a drop down menu populated by sql.
$result = mysql_query ("select Name from dba.wx_faq_backup where Name like '%dev%' group by Name") or die (mysql_error());
//$result = mysql_query ("select Name from dba.wx_faq_backup group by Name") or die (mysql_error());
echo "<select name='DB_Backup' value=''>DB_Backup</option>";
$i=1;
while($nt=mysql_fetch_assoc($result))
{
echo "<option selected value='$i' > $nt[Name] </option>"."<BR>";
$i++;
}
echo "</select>";
This works fine. On the second page I have an include that includes the first page and I have a variable extracting the value, but when I echo this variable it is not correct? I seem to get values like 1 and 5?
<?php include ("restore_table.php");?>
$backup = $_POST["DB_Backup"];
echo $backup;