Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- * {
- text-align:center;
- font-family:Segoe UI;
- </style>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="description" content="">
- <meta name="author" content="">
- <link rel="icon" href="../../favicon.ico">
- <title>TTUL Registration Page</title>
- <!-- Bootstrap core CSS -->
- <link href="css/bootstrap.min.css" rel="stylesheet">
- <!-- Custom styles for this template -->
- <link href="signin.css" rel="stylesheet">
- <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
- <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
- <script src="../../assets/js/ie-emulation-modes-warning.js"></script>
- <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
- <![endif]-->
- </head>
- <form action="register.php" method="POST">
- <body>
- <h2><strong>
- <div class="container">
- <form class="form-signin" role="form">
- <h2 class="form-signin-heading">Please Fill Out Information Fields To Register.</h2>
- <br />
- <br />
- <div class="well">
- <input type="firstname" class="form-control" placeholder="First Name" name="fname" required autofocus>
- <br />
- <br />
- <input type="lastname" class="form-control" placeholder="First Name" name="lname" required autofocus>
- <br />
- <br />
- <input type="email" class="form-control" placeholder="Email address" name="email" required autofocus>
- <br />
- <br />
- <input type="text" class="form-control" placeholder="IGN" name="username" required>
- <br />
- <br />
- <input type="password" class="form-control" placeholder="Password" name="password" required>
- <br />
- <br />
- <button class="btn btn-lg btn-primary btn-block" type="submit">Register</button>
- </div>
- </form>
- </div> <!-- /container -->
- <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
- <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
- </h1>
- </strong>
- </form>
- </body>
- </html>
- <?php
- $username = "username";
- $password = "password";
- $hostname = "localhost";
- $databasehandle = mysql_connect($hostname, $username, $password) or die("Couldn't Connect to the database!");
- $selected = mysql_select_db("toontow7_login", $databasehandle);
- if(isset($_POST['username'] && isset($_POST['password']) && isset($_POST['fname']) && isset($_POST['lname']) && isset($_POST['email']))) {
- $user = $_POST['username'];
- $pass = $_POST['password'];
- mysql_query("INSERT INTO users (Username, Password) VALUES ($user, $pass)");
- echo("
- <html>
- <body>
- <h1>
- User created Successfully.
- </h1>
- <h2>
- <a href='login.php' style='text-decoration:none;'>
- Click Here to go to Login Page.
- </h2>
- </a>
- </body>
- </html> ")
- }
- else {
- echo '
- <script type="text/javascript">
- alert("Please Fill Out the Registeration Form Correctly.");</script>';
- die(mysql_error());
- }
- mysql_close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement