I have PHP/Apache/MySQL installed on my WinXP laptop. I do this so that I
can write programs when not connected to the Internet (like when
traveling). I am trying to set a cookie from the http://localhost site on
my computer and it doesn't get set. Does this sound like something wrong
in my
I have PHP/Apache/MySQL installed on my WinXP laptop. I do this so that I
can write programs when not connected to the Internet (like when
traveling). I am trying to set a cookie from the http://localhost site on
my computer and it doesn't get set. Does this sound like something wrong
in
Sorry about that. Here is my code:
if(isset($coach_access[login_id])){
}elseif(($lusername) ($lpassword)) {
if(($lusername==me) AND ($lpassword==apass)){
$cookhost=$_SERVER[HTTP_HOST];
setcookie (coach_access[login_id],
Can you try this example? Let's call the file cookie_test.php
?
if (!empty($_COOKIE['test']))
{
echo The test cookie was sent by the browser\n;
}
else
{
header('Set-Cookie: test=true');
echo Trying to set the test cookie.br /\n;
echo a href=\./cookie_test.php\Test/a\n;
}
?
I
h. This seemed to set the cookie just fine. Does this mean that
either localhost in the browser or Apache/PHP on a windows box has to set
the cookie differently than on RedHat/Apache/PHP? I am going on vacation
next week and need to keep working on a project that is working fine on the
h. This seemed to set the cookie just fine. Does this mean that
either localhost in the browser or Apache/PHP on a windows box has to set
the cookie differently than on RedHat/Apache/PHP? I am going on vacation
next week and need to keep working on a project that is working fine on
the
hm. Looks like on my localhost I can't seta cookie like this:
setcookie (coach_access[login_id], coach,0,/,$cookhost);
if I change it to just:
setcookie (coach_access_login_id, coach,0,/,$cookhost);
it will work. But then my script won't work without a lot of re-writing
because it uses
--- Steve Buehler [EMAIL PROTECTED] wrote:
h. This seemed to set the cookie just fine.
I thought it might. :-)
Does this mean that either localhost in the browser or
Apache/PHP on a windows box has to set the cookie differently
than on RedHat/Apache/PHP?
Nope, it just means that the
From: Steve Buehler [EMAIL PROTECTED]
hm. Looks like on my localhost I can't seta cookie like this:
setcookie (coach_access[login_id], coach,0,/,$cookhost);
if I change it to just:
setcookie (coach_access_login_id, coach,0,/,$cookhost);
it will work. But then my script won't work
--- Steve Buehler [EMAIL PROTECTED] wrote:
header('Set-Cookie: coach_access[login_id]=coach');
Well, that is ugly, but it is actually a valid name. The name of a cookie,
as described by http://wp.netscape.com/newsref/std/cookie_spec.html, is a
sequence of characters excluding semi-colon, comma
Cpt John W. Holmes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
From: Steve Buehler [EMAIL PROTECTED]
hm. Looks like on my localhost I can't seta cookie like this:
setcookie (coach_access[login_id], coach,0,/,$cookhost);
if I change it to just:
setcookie
That still won't work for me for some reason. I am just going to rewrite
parts of the script to use a cookie name with out a [something] IN the
name. I will rename it to ca_id or something like that.
Thanks for your help
Steve
At 01:38 PM 7/30/2003 -0700, you wrote:
--- Steve Buehler [EMAIL
At 04:37 PM 7/30/2003 -0400, you wrote:
You'd be better of if you re-wrote your code to make it correct, but you
could just put:
$coach_access['login_id'] = $_COOKIE['coach_access[login_id]'];
I guess I will rewrite my code. I still can't understand it working on the
RedHat and not the Windows,
* Thus wrote Chris Shiflett ([EMAIL PROTECTED]):
--- Steve Buehler [EMAIL PROTECTED] wrote:
header('Set-Cookie: coach_access[login_id]=coach');
Well, that is ugly, but it is actually a valid name. The name of a cookie,
as described by http://wp.netscape.com/newsref/std/cookie_spec.html, is
--- Curt Zirzow [EMAIL PROTECTED] wrote:
Now, when a browser sends this, it will be something like this:
Cookie: coach_access[login_id]=coach
A cookie name can only be a HTTP/1.1 tolken as defined in rfc2109:
Well, this isn't the case. You see, neither RFC 2109 nor RFC 2965 are
15 matches
Mail list logo