Thanks Kale, I'll have a go with your code
- Original Message -
From: kale [EMAIL PROTECTED]
To: Php. Net [EMAIL PROTECTED]
Cc: 'Awlad Hussain' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:29 AM
Subject: RE: [PHP] cookie problemes (solved with javascript)
I not a expert in javascript but this code is working.
I guess it is easy to change some line of code to work for your neads.
Kale
// kale's code
_
?
$ID = kale;
$n_sessid = $ID._Sessid;
session_start();
$sessid = session_id();
if(isset($Read)){
print $HTTP_COOKIE_VARS[$n_sessid];
}
?
script language=JavaScript
function setCookie(name, value)
{
var the_name = name;
var the_value = value;
var the_cookie = the_name + = + escape(the_value);
var the_date = new Date(December 31, 2050);
var the_cookie_date = the_date.toGMTString();
the_cookie = the_cookie + ;expires= + the_cookie_date;
document.cookie = the_cookie;
alert(Thanks, now go to the next page.);
}
/script
form name=insertCookie method=post
input type=submit name=Cookie value=Cookie
onClick=setCookie('?print $n_sessid;?', '?print $sessid;?')
input type=submit name=Read value=Read
/form
__
// end kale's code
__
-Original Message-
From: Awlad Hussain [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 11:15 AM
To: kale
Subject: Re: [PHP] cookie problemes
Hi Kale,
I have the same problem with cookie, i would appericiate if you can
share the java script code you used to create the cookie and how it
solved the problem.
-awlad
- Original Message -
From: kale [EMAIL PROTECTED]
To: Php. Net [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 7:59 AM
Subject: RE: [PHP] cookie problemes
The clock is ok. I write cookie with javascript and read with php. For
moment is the best solution i have. In future i hope to resolve this
problem and i find solution i post it here. Thanks for help.
kale
-Original Message-
From: Gonzo [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 8:11 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] cookie problemes
$path = /;
$domain = .mydomain.ro;
And in my cookie folder i find a cookie named:
[EMAIL PROTECTED] But other computer (with
problems) i don't have any cookie with same name.
And if i reload the page and print $HTTP_COOKIE_VARS[$n_sessid] it's
nothing. I have 12 computers and 10 are ok.
Check the clocks on the 2 machines that do not have the cookies.
Gonzo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php