Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sql="SELECT email,password FROM customer WHERE email='$username' AND password='$password'";
- $result=mysql_query($sql) or die(mysql_error());
- $rws= mysql_fetch_array($result);
- $user=$rws[0];
- $pwd=$rws[1];
- if($user==$username && $pwd==$password){
- session_start();
- $_SESSION['customer_login']=1;
- $_SESSION['cust_id']=$username;
- header('location:/customer_account_summary.php');
- }
- else{
- header('location:/index.php');
- }}
- ?>
- <?php
- session_start();
- if(isset($_SESSION['customer_login']))
- header('location:customer_account_summary.php');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement