0) { $fetchqry=mysql_fetch_array($resqry); $userid=$fetchqry['id']; $username1=$fetchqry['email_id']; $new_status=$fetchqry['status']; $username2=$fetchqry['name']; //session start //session_start(); $_SESSION["userid"]=$userid; $_SESSION["username1"]=$username1; $_SESSION["username2"]=$username2; if($new_status==0) { header("location:product-list-distributor.php"); } else { header("location:my-account.php"); } } else { header("location:login.php?error=error"); } } ?>