I have generated a list of tick boxes from the database to show accounts that aren't authorised yet.
When I run the sql query:
$numrows =count($authorised);
for ($x=0;$x<$numrows;$x++){
$sql = "update users set authorised='$authorised[$x]' where ID= '$ID[$x]'";
$result = mysql_query($sql);
}
Say I pass two items to the query, this is what the sql does:
update users set authorised='' where ID= ''
update users set authorised='1' where ID= '2'
As you can see the first one is blank. Any suggestions?