Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. $sql="SELECT email,password FROM customer WHERE email='$username' AND password='$password'";
  2. $result=mysql_query($sql) or die(mysql_error());
  3. $rws= mysql_fetch_array($result);
  4.  
  5. $user=$rws[0];
  6. $pwd=$rws[1];
  7.  
  8. if($user==$username && $pwd==$password){
  9. session_start();
  10. $_SESSION['customer_login']=1;
  11. $_SESSION['cust_id']=$username;
  12. header('location:/customer_account_summary.php');
  13. }
  14.  
  15.  
  16. else{
  17. header('location:/index.php');
  18. }}
  19. ?>
  20. <?php
  21. session_start();
  22.  
  23. if(isset($_SESSION['customer_login']))
  24. header('location:customer_account_summary.php');
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement