Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>GGL Duel League Registration</title>
- <link rel="stylesheet" type="text/css" href="GGL.css" />
- </head>
- <body>
- <img src="images/ggl_logo.gif" width="250" height="150" />
- <h1>GGL Duel League Registration</h1>
- <form name="register" action="" method="post" enctype="multipart/form-data">
- First Name: <input type="text" name="fname" /><br/>
- Last Name: <input type="text" name="lname" /><br/>
- Site Username: <input type="text" name="alias" /><br/>
- Site Password: <input type="password" name="password" /><br/>
- Quake Live Username:<input type="text" name="qlun" /><br/>
- <input type="hidden" name="MAX_FILE_SIZE" value="102400" />
- Image Profile Picture: <input type="file" name="userpic" value="Browse!" /><br/>
- <input type="submit" name="submit" value="Register!"/>
- </form>
- </body>
- </html>
- <?php
- if (isset($_POST['submit'])) {
- require_once 'constants.php';
- $target_path = "/home/a6776762/public_html/GGL/users/";
- $file = basename($_FILES['userpic']['name']);
- $target_path = $target_path . $file;
- $tok = strtok($file, ".");
- $tok = strtok(".");
- if ((strtolower($tok) == "jpeg") || (strtolower($tok) == "jpg"))
- {
- move_uploaded_file($file, $target_path);
- }
- else
- echo "Invalid file type! Please try again with a JPG image under 100 KB";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement