Here'; $disabled = '1'; } if ( isset($_SESSION['username'])) { $result = mysql_query("SELECT * from user where username='$_SESSION[username]'") or die(mysql_error()); $row = mysql_fetch_array( $result ); if ( $row['access'] == '1') { $error = 'Click Here To Enable Your Ability To Upload'; $disabled = '1'; } // Set basic upload Options $max = '10485760'; $extensions = array( 'jpg','png','gif','doc','txt','pdf'); if ( isset( $_POST['submit'])) { $file_name = $_FILES['userfile']['name']; $file_ext = explode( '.' , $file_name ); $file_ext = $file_ext[1]; if ( $_FILES['userfile']['size'] > $max) { die('File Is Too Big'); } if (!in_array($file_ext, $extensions)) { $error = "Sorry, That File Type Is Not Aloud"; } if ( $_FILES['userfile']['name'] == "") { $error = "Invalid File Name Specified"; } if (!isset($error)) { $d = $_SESSION['username']; $e = $_FILES['userfile']['name']; $d = "upload/$d/$e" ; $filename = $_FILES['userfile']['tmp_name']; if ( move_uploaded_file( $filename, $d) ) { echo "$e was successfully uploaded.\n"; } } else { $error = "$error ( $_FILES[userfile][error] )"; } } } // End of ?>

"; } ?>
Upload File: >

>

= '2') { ?>
My Files: $filelist"; } else { echo "Click here to view your files"; } ?>
Allowed File Formats Are: .Jpg, .png, .gif, .doc, .txt., .pdf With a Max File Size Of 10 mb
For Additonal Formats Contact Me Or Post On Forum