jfs0479 Posted March 22, 2007 Share Posted March 22, 2007 Hi all, I am just building a site for someone and i was wondering how can we make a session personal so when someone looks in their previous sessions in their browse they will be able to see Arabian Airlines rather than PHPSESSION? Below is the code i currently use to create the session. <? session_start(); header("Location: crew_department.php"); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Arabian Login Check</title> </head> <body> <?php include 'db.php'; $pid = $_POST['pid']; $password1 = $_POST['password1']; if((!$pid) || (!$password1)){ echo "Please enter ALL of the information for your login! <br />"; include 'login.php'; exit(); } $sql = mysql_query("SELECT * FROM bluepilots WHERE pid='$pid' AND password1='$password1' AND level='2'"); $login_check = mysql_num_rows($sql); if($login_check > 0){ while($row = mysql_fetch_array($sql)){ foreach( $row AS $key => $val ){ $$key = stripslashes( $val ); } //Register session variables. session_register('pid'); $_SESSION['pid'] = $pid; session_register('password1'); $_SESSION['password1'] = $password1; session_register('firstname'); $_SESSION['firstname'] = $firstname; session_register('lastname'); $_SESSION['lastname'] = $lastname; session_register('email1'); $_SESSION['email1'] = $email1; session_register('country'); $_SESSION['country'] = $country; session_register('networks'); $_SESSION['networks'] = $networks; session_register('aboutyou'); $_SESSION['aboutyou'] = $aboutyou; } } ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/43847-sessions-made-personal/ Share on other sites More sharing options...
cmgmyr Posted March 22, 2007 Share Posted March 22, 2007 you can use session cookies...or just cookies Link to comment https://forums.phpfreaks.com/topic/43847-sessions-made-personal/#findComment-212865 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.