forked from science-ation/science-ation
Only try to insert category preferences if they've submitted category preferences
This commit is contained in:
parent
515e615a8f
commit
9881ddb968
@ -76,9 +76,12 @@
|
||||
}
|
||||
mysql_query("DELETE FROM judges_catpref WHERE judges_id='".$_SESSION['judges_id']."'");
|
||||
|
||||
foreach($_POST['catpref'] AS $k=>$v)
|
||||
if(is_array($_POST['catpref']))
|
||||
{
|
||||
mysql_query("INSERT INTO judges_catpref (judges_id,projectcategories_id,rank,year) values ('".$_SESSION['judges_id']."','$k','$v','".$config['FAIRYEAR']."')");
|
||||
foreach($_POST['catpref'] AS $k=>$v)
|
||||
{
|
||||
mysql_query("INSERT INTO judges_catpref (judges_id,projectcategories_id,rank,year) values ('".$_SESSION['judges_id']."','$k','$v','".$config['FAIRYEAR']."')");
|
||||
}
|
||||
}
|
||||
|
||||
echo notice(i18n("%1 %2 successfully updated",array($_POST['firstname'],$_POST['lastname'])));
|
||||
|
Loading…
Reference in New Issue
Block a user