<?php
session_start();
//include('config.php');
    $uname=trim($_POST['uname']);
    $password=trim($_POST['password']);
    
    if($uname == "admin"){
        if($uname=="admin" && $password=="admin.123")
        {
            echo ("success");
            $_SESSION['user']= 'admin'; 
            $_SESSION['user_type']= '1';
        }
        else{
            echo "Invalid Username and/or Password";
            session_destroy();
        }
    }
    if($uname == "ayush"){
        if($uname=="ayush" && $password=="ayush.123")
        {
            echo ("success");
            $_SESSION['user']= 'ayush'; 
            $_SESSION['user_type']= '2';
        }
        else{
            echo "Invalid Username and/or Password";
            session_destroy();
        }
    }
   
    
    
    
    
?>
