Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
3.4 kB
3
Indexable
Never
<!DOCTYPE html>
<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.0">
    <title>LOGIN</title>
    <link rel="stylesheet" href="style.css">
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css">

</head>
<body>
<div class="container" id="container">
  <div class="form-container sign-up-container">
    <form action="#">
      <h1>Create Account</h1>
      <div class="social-container">
        <a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
        <a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
        <a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
      </div>
      <span>or use your email for registration</span>
      <input type="text" placeholder="Name"  name="name"/>
      <input type="email" placeholder="Email" />
      <input type="password" placeholder="Password" />
      <input type="submit" class="ghost" id="signUp" name="submit1">Sign Up</submit>
    </form>
  </div>
  <div class="form-container sign-in-container">
    <form action="#">
      <h1>Sign in</h1>
      <div class="social-container">
        <a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
        <a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
        <a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
      </div>
      <span>or use your account</span>
      <input type="email" placeholder="Email" name="email" />
      <input type="password" placeholder="Password" name="pwd" />
      
      <button>Sign In</button>
    </form>
  </div>
  <div class="overlay-container">
    <div class="overlay">
      <div class="overlay-panel overlay-left">
        <h1>PIXO</h1>
		<h2>Welcome Back!</h2>
        <p>To keep connected with us please login with your personal info</p>
        <input type ="submit" name ="submit" class="ghost" id="signIn">Sign In</button>
      </div>
      <div class="overlay-panel overlay-right">
        <h1>Hello, Friend!</h1>
        <p>Enter your personal details and start journey with us</p>
        <input type="submit" class="ghost" id="signUp" name="submit1">Sign Up</button>
        <?php
        include('connect.php')
        if(isset($_POST['submit']))
      {
            $uname=$_POST['email'];
            $pswd=$_POST['pwd']
        $qry= mysqli_query($con,"select * from login where username= '$uname' and password='$pwd'");
        $res=mysqli_fetch_array($qry);
        $num=mysqli_num_rows($qry);
        if($num>0)
        {
          echo "<script> window.location=' '</script>"
        }
        else
        {
          echo "<script>alert('Invalid username or password')</script>";
        }
      }
      if(isset($_POST['submit1']))
      {
            $uname=$_POST['email'];
            $pswd=$_POST['pwd']
        $qry= mysqli_query($con,"insert into reg values('$_POST[t1]','$age')");
        
        if($qry)
        {
          echo "<script>alert('Sucess');window.location('disp.php')</script>";
        }
        else

        {
          echo "<script>alert('fail')</script>";
        }
      }

    
        ?>
      </div>
    </div>
  </div>
</div>
<script src="login.js"></script>
</body>
</html>