mysql_query("UPDATE dd_games SET name='$name', description='$desc', width='$width', height='$height', category='$category', thumburl='$thumburl', enabledcode='$enabledcode' active='$active', tags='$tags', highscore='$highscore', highscoreuser='$highscoreuser', highscoredate='$highscoredate', highscoreip='$highscoreip' WHERE ID='$ID'"); }else{echo '<form action=\''.$domain.'/index.php?action=admin&case=managegames&cmd=edit&ID='.$ID.'&type=1\' method=\'POST\'>
if(isset($_POST['submit'])){ $thumburl = $_POST['thumburl']; $name = $_POST['name']; $desc = $_POST['desc']; $category = $_POST['category']; $active = $_POST['active']; $enabledcode = $_POST['enabledcode']; $tags = $_POST['tags']; $highscore = $_POST['highscore']; $highscoreuser = $_POST['highscoreuser']; $highscoredate = $_POST['highscoredate']; $highscoreip = $_POST['highscoreip']; mysql_query("UPDATE dd_games SET name='$name', description='$desc', category='$category', thumburl='$thumburl', enabledcode='$enabledcode', active='$active', tags='$tags', highscore='$highscore', highscoreuser='$highscoreuser', highscoredate='$highscoredate', highscoreip='$highscoreip' WHERE ID='$ID'"); echo '<div class=\'error\'>Game updated.<br /> <A href="#" onclick="history.go(-1)">Back</a></div></div>'; }else{echo '<form action=\''.$domain.'/index.php?action=admin&case=managegames&cmd=edit&ID='.$ID.'&type=2\' method=\'POST\'>