don’t know if I’m missing any syntax:
for($i=1; $i<9; $i++)
{
if($weekInfo == "week". $i)
{
//echo "d".$i;
$Query="UPDATE databaseName SET 'd'.$i='" .addslashes($d1). "',weekInfo='" .addslashes($weekInfo). "' WHERE uid='".addslashes($uid)."'";
$result = mysql_query($Query);
}
}
Aside from not using
mysql_functions, it seems all you need are some backticks. I would also recommend you explicitly define the column name before hand. You should turn on error reporting as it will help you figure out where you issues are coming from. At the least,echo $Query;.