Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['submit1']))
- {
- require_once 'config.php';
- $_SESSION['username'] = $_POST['username'];
- $myusername = $_SESSION['username'];
- $mypassword = $_POST['password'];
- $sql = "SELECT * FROM customer WHERE CusID = '$myusername' and Pass = '$mypassword'";
- $result = mysqli_query($conn,$sql);
- $row = mysqli_fetch_array($result,MYSQLI_ASSOC);
- $_SESSION['CusName'] = $row['CusName'];
- // If result matched $myusername and $mypassword, table row must be 1 row
- if($row['CusID'] == $myusername && $row['Pass'] == $mypassword)
- {
- header("Location: menu.php");
- }
- if($row['CusID'] != $myusername)
- { ?>
- <script language="javascript">
- alert("You are not registered")</script>
- <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement