submit-logo.php: delete file if sql-insert failed

This commit is contained in:
Erik Faye-Lund 2013-05-12 22:06:01 +02:00
parent 3bc7beaf47
commit 858d204ce5

View File

@ -73,7 +73,8 @@ if($submitok) {
$query ="INSERT INTO logos SET ";
$query.="file='".$custom_name."', ";
$query.="author1=".$_SESSION["SCENEID_ID"];
mysql_query($query);
mysql_query($query)
or unlink($logos_path.$custom_name);
}
?>