RE: [PHP]: session problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



indeed...


From: "Hutchins, Richard" <Richard.Hutchins@xxxxxxxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Subject: RE: [PHP]: session problem
Date: Thu, 24 Jun 2004 11:52:38 -0400
MIME-Version: 1.0
Received: from pb1.pair.com ([216.92.131.4]) by mc6-f23.hotmail.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 24 Jun 2004 08:53:06 -0700
Received: (qmail 46847 invoked by uid 1010); 24 Jun 2004 15:52:42 -0000
Received: (qmail 46808 invoked by uid 1010); 24 Jun 2004 15:52:42 -0000
X-Message-Info: JGTYoYF78jFRl5xFT3FYrNMzPyW4jY3K
Mailing-List: contact php-db-help@xxxxxxxxxxxxx; run by ezmlm
Precedence: bulk
list-help: <mailto:php-db-help@xxxxxxxxxxxxx>
list-unsubscribe: <mailto:php-db-unsubscribe@xxxxxxxxxxxxx>
list-post: <mailto:php-db@xxxxxxxxxxxxx>
Delivered-To: mailing list php-db@xxxxxxxxxxxxx
Delivered-To: ezmlm-scan-php-db@xxxxxxxxxxxxx
Delivered-To: ezmlm-php-db@xxxxxxxxxxxxx
Message-ID: <1EA7D3AE70ACD511BE6D006097A78C1E05887A21@USROCEXC>
X-Mailer: Internet Mail Service (5.5.2657.72)
Return-Path: php-db-return-34920-double_u1=hotmail.com@xxxxxxxxxxxxx
X-OriginalArrivalTime: 24 Jun 2004 15:53:08.0025 (UTC) FILETIME=[57F45A90:01C45A03]


So, on your second page you NEVER see the "Welcome..." get echoed out? It
always forwards you to the user.php page?

> -----Original Message-----
> From: H. J. Wils [mailto:double_u1@xxxxxxxxxxx]
> Sent: Thursday, June 24, 2004 11:44 AM
> To: matijevich@xxxxxxxxxxxxxxxxxxxxxxxx; php-db@xxxxxxxxxxxxx
> Subject: Re:  [PHP]: session problem
>
>
> this is the code, but this code works on my hosting provider
> but not on my
> own server. I think i have to change settings in php.ini but
> dont know
> which...
> first page:
>
> session_start();
>
> include "connect.php";
> include "functions.php";
>
> 	    $user= $_GET["email"];
> 	    $ww = $_GET["ww"];
>
> 	    $check_user_query = "select id,email, password from
> user where
> email='$user' and password='$ww'";
> 	    $check_user_res = mysql_query($check_user_query) or
> die(mysql_error().": $check_user_query");
>
> 	    if (mysql_num_rows($check_user_res) == 1){
> 		   //user is ingelogd
>
> 		                 $userdata =
> mysql_fetch_array($check_user_res);
> 	 		 $sid=session_id();
> 		                 $uid=$userdata["id"];
> 			 $_SESSION['logged_in'] = true;
> 			 $_SESSION['sid'] = $sid;
> 			 $_SESSION['user'] = $uid;
>
> 	 		 $dt = date("Y-m-d H:i:s");
>
>   	       header("location: user.php?action=0");
> 	    }else{
> 		   header("location: user.php?action=9");
> 		}
>
>
> second page:
>
> <?php
>
> session_start();
>
> if ( isset($_SESSION['logged_in'])){
>
> echo "Welcome...";
>
> }else{
> 	  header("location: user.php?action=9");
> }
> ?>
>
> _________________________________________________________________
> Hotmail en Messenger on the move
> http://www.msn.nl/communicatie/smsdiensten/hotmailsmsv2/
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

_________________________________________________________________
Talk with your online friends with MSN Messenger http://messenger.msn.nl/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux