Hello ya'll, first post. Please be gentle Learning by creating myphpAdmin type page functions, still have a long way to go. Lots of cut/paste and modifications so far.
Here I retrieve a list of databases, then add radio buttons, can anyone tell me where I'm going wrong? Am I doing it all wrong?
<?php
$con = mysql_connect($dbhost,$dbuser,$dbpass);
$set = mysql_query('SHOW DATABASES',$con);
$dbs = array();
while($db = mysql_fetch_row($set))
$dbs[] = $db[0];
echo '<form action="deletedb.php" method="post">';
echo '<input name=$db type=radio value=$db>';
echo implode('<tr><td><input type="radio" name="<?php echo $dbs; ?>" value="<?php echo $dbs; ?>"</td></tr>' , $dbs) . "<br>";
echo '<input type="submit">';
echo '</form>';
?>
It does retrive the DB list. And it does put the radio buttons next to each one, in a horizontal line, I'd prefer a verticle list but that's not so important right now.
I can't seem to get $_POST['xxx'] to work in deletedb.php (using echo to test with), I've tried name and value but it's not sending anything over, I copied the $set, $dbs, while and echo implode lines from the web and messed around til I had something resembling a table with radio buttons.
ANY comments on this code, what's wrong or what could be better are encouraged and greatly appreciated!
Thanks!