I wish it did.

Still the same problem.

<?php
session_start();
global $count;
session_register ("count");
$count++;
?>

Hello visitor, you have seen this page <?php echo
$HTTP_SESSION_VARS["count"]; ?> times.<p>

http://www.militarycity.com/classified/realtors/count.php

Chad

-----Original Message-----
From: karthik [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 1:08 AM
To: Chad Day
Subject: Re: [PHP] Session problem


Hi,

Have u tried $HTTP_SESSION_VARS["NAME"] ?

Try it. I am sure it will work.

Karthik


----- Original Message -----
From: "Chad Day" <[EMAIL PROTECTED]>
To: "mike cullerton" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 6:46 PM
Subject: RE: [PHP] Session problem


> I tried this, I still have the same problem.  Is this a bug in the version
> of PHP I am running?
>
> Chad
>
> -----Original Message-----
> From: mike cullerton [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 06, 2001 4:58 PM
> To: Chad Day; [EMAIL PROTECTED]
> Subject: Re: [PHP] Session problem
>
>
> i would try
>
> session_start();
> session_register("NAME");
>
> $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND
> PASSWORD = '$PASSWORD'");
>
> if ($row = mysql_fetch_array($res)) {
>  $NAME = $row[NAME];
> }
>
> notice that $NAME is registered before being assigned to.
>
> on 8/6/01 2:23 PM, Chad Day at [EMAIL PROTECTED] wrote:
>
> > PHP 4.0.2 ..
> >
> > I have a very basic script, gets the user's name, registers it, then
> > displays "Welcome, $NAME."   $NAME is the session registered name.
> >
> > If I constantly reload that page that says Welcome, sometimes $NAME
> appears,
> > sometimes not.  Completely random.  It just loses track of the variable.
> >
> > My code:
> >
> > auth.php:
> >
> > session_start();
> >
> > ...
> >
> > $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND
> > PASSWORD = '$PASSWORD'");
> >
> > if ($row = mysql_fetch_array($res)) {
> > $NAME = $row[NAME];
> > session_register("NAME");
> > }
> >
> > ...
> >
> > Header("Location: menu.php");
> >
> >
> >
> > menu.php:
> >
> > session_start();
> >
> > echo "Welcome, $NAME";
> >
> >
> >
> > So like, what the hell.  Why would it keep losing track of $NAME?
> >
> > Thanks,
> > Chad
> >
>
>
> -- mike cullerton
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to