Re: [PHP-DB] pulling my hair out

2001-07-11 Thread Dobromir Velev

Hi,
As I can see you're trying to set a cookie that has expired an hour ago. May
be you could try to modify the setcookie() arguments to something like this

setcookie ("logged_in", "yes", time() + 3600);
setcookie ("logged_user_name", "brad", time() + 3600);

This will make your cookies to expire after an hour. If you want to set a
Cookie that will expire when the browser is closed you can replace
time()+3600 with 0.

Dobromir Velev

-Original Message-
From: Brad Lipovsky <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, July 12, 2001 7:19 AM
Subject: [PHP-DB] pulling my hair out


>I have one script that looks like this:
>
>setcookie ("logged_in", "yes", time() - 3600);
>setcookie ("logged_user_name", "brad", time() - 3600);
>?>
>
>
>
>
>
>SENT
>
>
>
>and another that looks like this:
>
>print "start ";
>echo $HTTP_COOKIE_VARS["logged_in"];
>print "";
>echo $logged_user_name;
>print "";
>print "end";
>?>
>
>which I have also tried like this:
>
>print "";
>echo $logged_in;
>print "";
>echo $logged_user_name;
>?>
>
>It seems like this should be extremely simple, but when I run the first
one,
>and then the second one, the second one only writes the 's to the
>document.  It also doesnt trigger my browser (tried in netscape and ie5) to
>alert me that a cookie is being sent, I turned that option on just to test
>this script.
>Please Help!
>
>
>Brad
>
>
>
>--
>PHP Database 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 Database 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]




Re: [PHP-DB] pulling my hair out

2001-07-11 Thread Tom Peck

Stupid html e-mail...

That code may not come through properly...  copy it from the site, as 
what's below is only half complete.

Tom



At 16:23 12/07/2001 +1200, you wrote:
>Brad
>
>Try this:
>--
>$status = 0;
>if (isset($myTstCky) && ($myTstCky == "ChocChip")) $status = 1;
>if (!isset($CCHK)) {
>setcookie("myTstCky", "ChocChip");
>header("Location: $PHP_SELF?CCHK=1");
>exit;
>}
>?>
>Cookie Check Status: $status ? "PASSED!" : "FAILED!"); ?>
>---
>
>
>It's taken from here:  http://www.php.net/manual/en/function.setcookie.php
>
>If that still fails to work then your PHP config must be awry..
>
>Tom
>
>
>
>
>At 21:16 11/07/2001 -0700, you wrote:
> >I have one script that looks like this:
> >
> > >setcookie ("logged_in", "yes", time() - 3600);
> >setcookie ("logged_user_name", "brad", time() - 3600);
> >?>
> >
> >SENT
> >and another that looks like this:
> >
> > >print "start ";
> >echo $HTTP_COOKIE_VARS["logged_in"];
> >print "";
> >echo $logged_user_name;
> >print "";
> >print "end";
> >?>
> >
> >which I have also tried like this:
> >
> > >print "";
> >echo $logged_in;
> >print "";
> >echo $logged_user_name;
> >?>
> >
> >It seems like this should be extremely simple, but when I run the first one,
> >and then the second one, the second one only writes the 's to the
> >document.  It also doesnt trigger my browser (tried in netscape and ie5) to
> >alert me that a cookie is being sent, I turned that option on just to test
> >this script.
> >Please Help!
> >
> >
> >Brad
> >
> >
> >
> >--
> >PHP Database 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 Database 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 Database 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]




Re: [PHP-DB] pulling my hair out

2001-07-11 Thread Tom Peck

Brad

Try this:
--


Cookie Check

Cookie Check Status:
%s
;',
$status ? "00FF00" : "FF",
$status ? "PASSED!" : "FAILED!");
?>


---


It's taken from here:  http://www.php.net/manual/en/function.setcookie.php

If that still fails to work then your PHP config must be awry..

Tom




At 21:16 11/07/2001 -0700, you wrote:
>I have one script that looks like this:
>
>setcookie ("logged_in", "yes", time() - 3600);
>setcookie ("logged_user_name", "brad", time() - 3600);
>?>
>
>SENT
>and another that looks like this:
>
>print "start ";
>echo $HTTP_COOKIE_VARS["logged_in"];
>print "";
>echo $logged_user_name;
>print "";
>print "end";
>?>
>
>which I have also tried like this:
>
>print "";
>echo $logged_in;
>print "";
>echo $logged_user_name;
>?>
>
>It seems like this should be extremely simple, but when I run the first one,
>and then the second one, the second one only writes the 's to the
>document.  It also doesnt trigger my browser (tried in netscape and ie5) to
>alert me that a cookie is being sent, I turned that option on just to test
>this script.
>Please Help!
>
>
>Brad
>
>
>
>--
>PHP Database 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 Database 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-DB] pulling my hair out

2001-07-11 Thread Brad Lipovsky

I have one script that looks like this:







SENT



and another that looks like this:

";
echo $HTTP_COOKIE_VARS["logged_in"];
print "";
echo $logged_user_name;
print "";
print "end";
?>

which I have also tried like this:

";
echo $logged_in;
print "";
echo $logged_user_name;
?>

It seems like this should be extremely simple, but when I run the first one,
and then the second one, the second one only writes the 's to the
document.  It also doesnt trigger my browser (tried in netscape and ie5) to
alert me that a cookie is being sent, I turned that option on just to test
this script.
Please Help!


Brad



-- 
PHP Database 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]