diff --git a/admin/schedule.php b/admin/schedule.php index 7067ad0..4ac01dc 100644 --- a/admin/schedule.php +++ b/admin/schedule.php @@ -154,12 +154,12 @@ } else if($_GET['action']=="saveevent") { $id=intval($_POST['id']); - if(!$id) { - mysql_query("INSERT INTO schedule (conferences_id) VALUES ('{$conference['id']}')"); - $id=mysql_insert_id(); - } list($event_id,$event_type)=explode(":",$_POST['event_id']); if($event_id>0) { + if(!$id) { + mysql_query("INSERT INTO schedule (conferences_id) VALUES ('{$conference['id']}')"); + $id=mysql_insert_id(); + } mysql_query("UPDATE schedule SET title='".mysql_real_escape_string($_POST['title'])."', date='".mysql_real_escape_string($_POST['date'])."',