Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Registration page</title>
- <link href="pic1.jpg" rel="icon">
- <link rel="stylesheet" type="text/css" href="regi.css">
- <body>
- <div class="loginbox">
- <img src="avatar.png" class="avatar">
- <h1>RUNNERS REGISTRATION</h1>
- <form action="regi.php" method="post">
- <p>Username</p>
- <input type="text" name="uname" placeholder="Enter Username">
- <p>Password</p>
- <input type="password" name="pass" placeholder="Enter Password">
- <p>Confirm Password</p>
- <input type="password" name="pass" placeholder="Enter Password again">
- <p>Email</p>
- <input type="email" name="email" placeholder="Enter your email">
- <p>Mobile</p>
- <input type="mobile" name="mobile" placeholder="Enter mobile no.">
- <input type="submit" name="login" value="Register>>>>">
- <a href="login.php"><button type="button" class="back_btn"><< Back to Login</button></a>
- </form>
- </div>
- </body>
- </head>
- </html>
- <?php
- if(isset($_POST['login']))
- {
- $username=$_POST['uname'];
- $password=$_POST['pass'];
- $email=$_POST['email'];
- $mobile=$_POST['mobile'];
- $con=mysqli_connect('localhost','root','','logindb');
- if($con)
- {
- //sql statement
- $sql="INSERT into user values('$username', '$password', 'email','mobile')";
- if(mysqli_query($con,$sql))
- {
- echo "Data Inserted";
- }
- else
- {
- echo "Problem inserting data!";
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment