here to go back.'; } else { if ( !isset ( $_POST['submit'] ) ) { ?>
Author:

'; ?> Title:

File upload:

Description:

'; $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!
'; } else { echo 'SQL ERROR: Unable to write to mySQL table.'; } } else { echo 'Sorry, the upload failed. Click here to try again.
'; } } else { echo 'File is not a valid mod, and was rejected. Click here to try again.
'; } } } ?>