Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <link type="text/css" rel="stylesheet" href="bootstrap/css/bootstrap.css">
- <link type="text/css" rel="stylesheet" href="bootstrap/css/myStyle.css">
- <title>OJRA - Registration</title>
- </head>
- <body>
- <div style="width:400px; height:400px; border-radius:5px; background-color:#aaa; margin-left:100px;">
- <form action="" method="post" style="margin-left:20px;">
- <h6>Username</h6>
- <input type="text" name="username" placeholder="Your Username">
- <h6>Password</h6>
- <input type="password" name="usrPassowrd" placeholder="Your password">
- <h6>Email</h6>
- <input type="email" name="usrEmail" placeholder="Your Email"><br>
- <input class = "btn btn-default" type="submit" value = "Register">
- </form>
- </div>
- <div style="width:400px; height:400px; border-radius:5px; background-color:#aaa; margin-left:100px;">
- <form action="" method="post" style="margin-left:20px;">
- <h6>Username:</h6> <input type="text" name="username" placeholder="Your username">
- <h6>Password:</h6> <input type="password" name="usrPassowrd" placeholder="Your password">
- <input class = "btn btn-default" type="submit" value="Sign in">
- </form>
- <?php
- define('INCLUDE_CHECK',true);
- require 'connect.php';
- $username = $_POST['username'];
- if($username == "")
- {
- die("cannot go empty");
- header("location:index.php");
- exit;
- }
- $password = $_POST['usrPassword'];
- $email = $_POST['usrEmail'];
- $query = "insert into tz_members values('$username', '$password', '$email')";
- mysql_query($query) or die(mysql_error());
- ?>
- </div>
- <img src="sexymotivation.jpg" style="margin-top:-800px; margin-right:10px;" class="pull-right">
- </body>
- </html>
- <!DOCTYPE html>
- <html>
- <head>
- <link type="text/css" rel="stylesheet" href="bootstrap/css/bootstrap.css">
- <link type="text/css" rel="stylesheet" href="bootstrap/css/myStyle.css">
- <title>OJRA - Registration</title>
- </head>
- <body>
- <div style="width:400px; height:400px; border-radius:5px; background-color:#aaa; margin-left:100px;">
- <form action="" method="post" style="margin-left:20px;">
- <h6>Username</h6>
- <input type="text" name="username" placeholder="Your Username">
- <h6>Password</h6>
- <input type="password" name="usrPassword" placeholder="Your password">
- <h6>Email</h6>
- <input type="email" name="usrEmail" placeholder="Your Email"><br>
- <input class = "btn btn-default" type="submit" value = "Register">
- </form>
- </div>
- <div style="width:400px; height:400px; border-radius:5px; background-color:#aaa; margin-left:100px;">
- <form action="" method="post" style="margin-left:20px;">
- <h6>Username:</h6> <input type="text" name="username" placeholder="Your username">
- <h6>Password:</h6> <input type="password" name="usrPassword" placeholder="Your password">
- <input class = "btn btn-default" name="submit" type="submit" value="Sign in">
- </form>
- <?php
- // this below, will prevent a premature execution of code
- if(isset($_POST['submit'])){
- define('INCLUDE_CHECK',true);
- require 'connect.php';
- $username = $_POST['username'];
- if($username == "")
- {
- die("cannot go empty");
- // header("location:index.php"); // commented out
- exit;
- }
- $password = $_POST['usrPassword'];
- $email = $_POST['usrEmail'];
- $query = "insert into tz_members values('$username', '$password', '$email')";
- mysql_query($query) or die(mysql_error());
- } // end brace for if(isset($_POST['submit']))
- ?>
- </div>
- <!-- commented out original img src -->
- <!--
- <img src="sexymotivation.jpg" style="margin-top:-800px; margin-right:10px;" class="pull-right">
- -->
- <!-- new img src by user3009875 in an answer given -->
- <img src="sexymotivation.jpg" style="margin-top:100px; margin-right:10px;" class="pull-right">
- </body>
- </html>
- <img src="sexymotivation.jpg" style="margin-top:100px; margin-right:10px;" class="pull-right">
- die("cannot go empty");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement