here to go back.'; } else { if ( !isset ( $_POST['submit'] ) ) { ?>
'; $filelocation = $_FILES['userfile']['name']; chmod($uploadFile,0644); $sql = "INSERT INTO `filedatabase` ( `name`, `author`, `description`, `location`, `dateposted` ) VALUES ( '" . addslashes ( $_POST['name'] ) . "', '" . addslashes ( $_SESSION['username'] ) . "', '". addslashes ( $_POST['desc'] ). "', '". addslashes( $filelocation ) . "', '". date("F j, Y"). "' )"; $result = mysql_query ( $sql ) or die ( mysql_error() ); if ( $result ) { echo 'Your mod was added successfully! Click here to return to the home page!