diff --git a/config/divisions.php b/config/divisions.php index 23863f1..c7e7e5b 100644 --- a/config/divisions.php +++ b/config/divisions.php @@ -77,9 +77,8 @@ if($_GET['action']=="edit" || $_GET['action']=="new") { } if($_POST['action']=="new") { - if($_POST['id'] && $_POST['division']) - { - $q=mysql_query("SELECT id FROM projectdivisions WHERE id='".$_POST['id']."' AND conferences_i='".$conference['id']."'"); + if($_POST['id'] && $_POST['division']) { + $q=mysql_query("SELECT id FROM projectdivisions WHERE id='".intval($_POST['id'])."' AND conferences_id='".$conference['id']."'"); if(mysql_num_rows($q)) { echo error(i18n("Division ID %1 already exists",array($_POST['id']),array("division ID"))); }