My goal is to have the value in the “commission” column in my “status” table change from ‘open’ to ‘closed’ I can’t seem to get the BD to update. I do not get any errors. What am I doing wrong?
This is the code for my submit button:
if($result["commissions"]=='open'){
echo '<form method="post" action="admin_main.php">
<input name="commissionsC" type="submit" value="Close commissions" />
</form>';
}
This is the part of my code that is not working:
[php]<?php
include(“includes/connect.php”);
if(isset($_POST[‘comissionsC’])){
$res= mysql_query(“SELECT * FROM status”);
$row= mysql_fetch_array($res);
$sql=“UPDATE status”.
“SET commissions = ‘closed’”.
“WHERE id = 1”;
}
?>[/php]