SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php | |
| 2 | $username = "myusername"; | |
| 3 | - | $username = "toontow7_login"; |
| 3 | + | $password = "mypassword"; |
| 4 | - | $password = "T2+~oTnf=ZEC"; |
| 4 | + | |
| 5 | ||
| 6 | $databasehandle = mysql_connect($hostname, $username, $password) or die("Couldn't Connect to the database!");
| |
| 7 | ||
| 8 | $selected = mysql_select_db("toontow7_login", $databasehandle);
| |
| 9 | ||
| 10 | if(isset($_POST['username'] && $_POST['password'] && $_POST['fname'] && $$_POST['lname'] && $_POST['email'])) {
| |
| 11 | $user = $_POST['username']; | |
| 12 | $pass = $_POST['password']; | |
| 13 | mysql_query("INSERT INTO users (Username, Password) VALUES ($user, $pass)");
| |
| 14 | echo("
| |
| 15 | <html> | |
| 16 | <body> | |
| 17 | <h1> | |
| 18 | User created Successfully. | |
| 19 | </h1> | |
| 20 | <h2> | |
| 21 | <a href='login.php' style='text-decoration:none;'> | |
| 22 | Click Here to go to Login Page. | |
| 23 | </h2> | |
| 24 | </a> | |
| 25 | </body> | |
| 26 | </html> ") | |
| 27 | } | |
| 28 | else {
| |
| 29 | echo ' | |
| 30 | <script type="text/javascript"> | |
| 31 | alert("Please Fill Out the Registeration Form Correctly.");</script>';
| |
| 32 | } | |
| 33 | ||
| 34 | mysql_close(); | |
| 35 | ?> | |
| 36 | ||
| 37 | ||
| 38 | <style> | |
| 39 | ||
| 40 | * {
| |
| 41 | text-align:center; | |
| 42 | font-family:Segoe UI; | |
| 43 | ||
| 44 | </style> | |
| 45 | <html lang="en"> | |
| 46 | <head> | |
| 47 | <meta charset="utf-8"> | |
| 48 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| 49 | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| 50 | <meta name="description" content=""> | |
| 51 | <meta name="author" content=""> | |
| 52 | <link rel="icon" href="../../favicon.ico"> | |
| 53 | ||
| 54 | <title>TTUL Registration Page</title> | |
| 55 | ||
| 56 | <!-- Bootstrap core CSS --> | |
| 57 | <link href="css/bootstrap.min.css" rel="stylesheet"> | |
| 58 | ||
| 59 | <!-- Custom styles for this template --> | |
| 60 | <link href="signin.css" rel="stylesheet"> | |
| 61 | ||
| 62 | <!-- Just for debugging purposes. Don't actually copy these 2 lines! --> | |
| 63 | <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]--> | |
| 64 | <script src="../../assets/js/ie-emulation-modes-warning.js"></script> | |
| 65 | ||
| 66 | <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> | |
| 67 | <!--[if lt IE 9]> | |
| 68 | <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | |
| 69 | <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
| 70 | <![endif]--> | |
| 71 | </head> | |
| 72 | ||
| 73 | ||
| 74 | <form action="register.php" method="POST"> | |
| 75 | <body> | |
| 76 | <h2><strong> | |
| 77 | ||
| 78 | <div class="container"> | |
| 79 | ||
| 80 | <form class="form-signin" role="form"> | |
| 81 | <h2 class="form-signin-heading">Please Fill Out Information Fields To Register.</h2> | |
| 82 | <br /> | |
| 83 | <br /> | |
| 84 | <div class="well"> | |
| 85 | <input type="firstname" class="form-control" placeholder="First Name" name="fname" required autofocus> | |
| 86 | <br /> | |
| 87 | <br /> | |
| 88 | <input type="lastname" class="form-control" placeholder="First Name" name="lname" required autofocus> | |
| 89 | <br /> | |
| 90 | <br /> | |
| 91 | <input type="email" class="form-control" placeholder="Email address" name="email" required autofocus> | |
| 92 | <br /> | |
| 93 | <br /> | |
| 94 | <input type="text" class="form-control" placeholder="IGN" name="username" required> | |
| 95 | <br /> | |
| 96 | <br /> | |
| 97 | <input type="password" class="form-control" placeholder="Password" name="password" required> | |
| 98 | <br /> | |
| 99 | <br /> | |
| 100 | <button class="btn btn-lg btn-primary btn-block" type="submit">Register</button> | |
| 101 | </div> | |
| 102 | </form> | |
| 103 | </div> <!-- /container --> | |
| 104 | <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> | |
| 105 | <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script> | |
| 106 | </h1> | |
| 107 | </strong> | |
| 108 | </form> | |
| 109 | </body> | |
| 110 | </html> |