Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $con = mysqli_connect('localhost','root');
- if($con){
- echo " conection successful";
- }else{
- echo"connection failed";
- }
- $db = mysqli_select_db($con, ' cbe schedular ');
- if(isset($_POST['submit'])){
- $email= $_POST ['email'];
- $password = $_POST['password'];
- $sql =" select *from admin where email = '$email' and password ='$password'";
- $query = mysqli_query($con,$sql);
- $row = mysqli_num_rows(){
- if($row == true){
- echo"login susccessful";
- $_SESSION['user'] = $username;
- header('location : adminmainpage.php');
- }else{
- echo "login failed";
- header('location:adminlogin.php');
- }
- ?>
- <?php
- session_start();
- $con = mysqli_connect('localhost','root');
- if($con){
- echo " conection successful";
- }else{
- echo"connection failed";
- }
- $db = mysqli_select_db($con, ' cbe_schedular ');
- if(isset($_POST['submit'])){
- $email= $_POST ['email'];
- $password = $_POST['password'];
- $sql =" select *from admin where email = '$email' and password ='$password'";
- $query = mysqli_query($con,$sql);
- $row = mysqli_num_rows();
- if($row == true){
- echo"login susccessful";
- $_SESSION['user'] = $username;
- header('location :../adminmainpage.php');
- }else{
- echo "login failed";
- header('location:adminlogin.php');
- }
- }
- $row = mysqli_num_rows(){
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement