I am a beginner at php and any help is much appreciated.
This is my problem, I am trying to update a mysql database with a set array in a dropdown menu within a dynamic table. Here is my code. This is where I am lost. I would like to click the Update button to change the data in the mysql database with a KEY (not value) from the set array. I know I’m needing a $_POST but I don’t know where I can put it.
Thank you for taking the time to look at this. If you have any questions please ask and I will respond ASAP.
[php]
$con = mysql_connect(‘server’, ‘user’, ‘password’);
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}
$a = array(‘something1’ ,‘something2’ ,‘something3’);
function statuslist($array){
foreach ($array as $key => $value){
print ‘’.$value.’’;
}
}
$query_all = ‘select * from table’;
$all = mysql_query($query_all);
if (!$all) {
die('Invalid query: ’ . mysql_error());
}