I am new in php i am getting this error while updating one of the column of the table
if(isset($_POST['approved'])) {
$change="SELECT * FROM `workplan`";
$forchange=mysql_query($change);
while ($infoChange = mysql_fetch_array($forchange)) {
$dep=$infoChange['division name']
mysql_query("UPDATE workplan SET status= ['0'] WHERE month=['january']");
}
}
i only one to update the column of status to the value from 1 to 0 from 13 colums ..
解决方案
You're missing a semi-colon:
$dep=$infoChange['division name']