Hi, I have written this script to select a database to backup
<?php
include("data/required.php");
if (!mysql_connect($dbhost, $dbuser, $dbpass)) {
echo 'Could not connect to mysql';
exit;
}
$showtablequery = "
SHOW TABLES
FROM
$db
";
$showtablequery_result = mysql_query($showtablequery);
while($showtablerow = mysql_fetch_array($showtablequery_result))
{
$table = $showtablerow[0]."<br />";
print "<form action='sqlexport.php?cmd=sqlbackup' method='POST'>";
print "<select name='backupFile'>";
print "<option>Backup Database</option>";
print sprintf("<option value='$table/%s'>%s</option>", $table, $table);
print "</select>";
print "<input type='submit' name='tmpupdate' value='update'>";
print "</form>";
print "</center>";
print '
</td>
</tr>
</table>';
}
?>
However it prints a select menu for each table. I want to be able to select the table from one select menu. What do I need to change?
Thanks