I get the error *You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[0]' at line 1 * when trying to update and email.
$updatelist = explode(",",$Limited);
print_r($updatelist); // echos Array ( [0] => [email protected] [1] => [email protected] [2] => )
$totalupdates = count($updatelist)-1;
for ($y = 0; $y < $totalupdates; $y++)
{
$updatemail = "UPDATE tblusers SET date= '$date' WHERE Email = 'updatelist[$y]'";
$updatefree = mysql_query($updatemail);
echo $updatemail;
}
What's wrong with the $updatelist[$y] ? Should it loop through $updatelist[0] to $updatelist[1] ?