Dont insert blank events into the schedule

This commit is contained in:
james 2010-06-17 16:07:27 +00:00
parent e1ef58f988
commit d45ababbbb

View File

@ -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'])."',