Guest User

santanu

a guest
Jan 13th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.68 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Registration page</title>
  5. <link href="pic1.jpg" rel="icon">
  6.     <link rel="stylesheet" type="text/css" href="regi.css">
  7. <body>
  8.     <div class="loginbox">
  9.     <img src="avatar.png" class="avatar">
  10.         <h1>RUNNERS REGISTRATION</h1>
  11.         <form action="regi.php" method="post">
  12.             <p>Username</p>
  13.             <input type="text" name="uname" placeholder="Enter Username">
  14.             <p>Password</p>
  15.             <input type="password" name="pass" placeholder="Enter Password">
  16.             <p>Confirm Password</p>
  17.             <input type="password" name="pass" placeholder="Enter Password again">
  18.             <p>Email</p>
  19.             <input type="email" name="email" placeholder="Enter your email">
  20.             <p>Mobile</p>
  21.             <input type="mobile" name="mobile" placeholder="Enter mobile no.">
  22.             <input type="submit" name="login" value="Register>>>>">
  23.             <a href="login.php"><button type="button" class="back_btn"><< Back to Login</button></a>
  24.            
  25.         </form>
  26.     </div>
  27. </body>
  28. </head>
  29. </html>
  30.  
  31.  
  32. <?php
  33.    
  34.     if(isset($_POST['login']))
  35.     {  
  36.         $username=$_POST['uname'];
  37.         $password=$_POST['pass'];
  38.         $email=$_POST['email'];
  39.         $mobile=$_POST['mobile'];
  40.         $con=mysqli_connect('localhost','root','','logindb');
  41.         if($con)
  42.         {  
  43.             //sql statement
  44.             $sql="INSERT into user values('$username', '$password', 'email','mobile')";
  45.  
  46.            
  47.             if(mysqli_query($con,$sql))
  48.             {
  49.                 echo "Data Inserted";
  50.             }
  51.             else
  52.             {
  53.                 echo "Problem inserting data!";
  54.             }
  55.         }
  56.     }
  57. ?>
Add Comment
Please, Sign In to add comment