if ($page == "uploadcomic"){ $getisadmin = mysql_query("SELECT * FROM rush_users WHERE username = '$_SESSION[rush_username]'")or die("Admin: ".mysql_error()); $isadmin = mysql_fetch_array($getisadmin); if ($isadmin['group'] != 4){die("Error! You must be an admin to upload a comic!");} if ($_POST['upload']){ $date = date("m/d/y, g:i a"); $comic = $HTTP_POST_FILES['comic']['name']; $name = $_POST['name']; $fetch_last = mysql_query("SELECT * FROM rush_comics ORDER BY id DESC")or die("Last: ".mysql_error()); $last = mysql_fetch_array($fetch_last); $lastid = $last['id'] + 1; $newfile = $lastid."_".$comic; $path = "comics/".$newfile; if(copy($HTTP_POST_FILES['comic']['tmp_name'], $path)) { echo("Comic uploaded sucessfully! Click here to view $name!"); }else{ die("There was en error uploading the comic. Sorry for the inconvience :(."); } } if (!$_POST['upload']){ echo(" Welcome, administrator $_SESSION[rush_username]! Fill out the information below to upload a comic!

File

Comic Title

"); } }