fixed bug when clicking cancel

This commit is contained in:
2018-12-01 15:49:53 -05:00
parent 4e6decdf99
commit 6d74d3fbc7

View File

@@ -86,14 +86,20 @@ class ps4 {
$sql = "UPDATE game_thumbnail SET thumbnail_url = '".$url."' WHERE game_id = '".$gameid."';"; $sql = "UPDATE game_thumbnail SET thumbnail_url = '".$url."' WHERE game_id = '".$gameid."';";
} }
$result = $this->mysql_conn($sql); if (($url == "") or ($url == "null")) {
if ($result == 1) { echo "<strong>ERROR:</strong> No URL specified.";
echo "<strong>SUCCESS:</strong> Updated image URL for <strong>". $gamename ."</strong> (". $gameid .")";
echo "<br/><br/>"; echo "<br/><br/>";
} else { } else {
echo "<strong>ERROR:</strong> Can't update image URL for <strong>". $gamename ."</strong> (". $gameid .")"; $result = $this->mysql_conn($sql);
echo "<br/><br/>"; if ($result == 1) {
echo "<strong>SUCCESS:</strong> Updated image URL for <strong>". $gamename ."</strong> (". $gameid .")";
echo "<br/><br/>";
} else {
echo "<strong>ERROR:</strong> Can't update image URL for <strong>". $gamename ."</strong> (". $gameid .")";
echo "<br/><br/>";
}
} }
} }
} }