Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- session_start();
- <html>
- <head>
- <style>
- .button1 {
- background-color: #d81e56;
- border: none;
- color: white;
- padding: 30px 50px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 16px;
- margin: 4px 2px;
- cursor: pointer;
- }
- </style>
- </head>
- <body>
- <?php
- $Username = $_POST['Username'];
- $Password = $_POST['Password'];
- $admin = $_POST['adminvar'];
- require "connect.php";
- $sql = "SELECT Username, Password, Role FROM vmsregistration WHERE Username='$Username' AND Password ='$Password' AND Role = '$admin'" ;
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- $_SESSION["Username"] = $Username;
- //echo $_SESSION["Username"];
- header('Location: vmsadmin.php');
- }
- else{
- $_SESSION["Username"] = $Username;
- //echo $_SESSION["Username"];
- header('Location: vmsstaff.php');
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement