On 12 Oct 2008, at 23:51, Micah Gersten wrote:
The question is, why aren't you using a session variable instead of
cookies? That's one of the greatest features of PHP.
If you're able to use cookies instead of sessions, and the size of the
data you're storing is fairly small, it's always
Hi,
My problem was a headers already sent error, which I fixed by redirecting
the form POST to a seperate file instead of the same login.php. Thanks for
all your help!
2008/10/13 Stut [EMAIL PROTECTED]
On 12 Oct 2008, at 23:51, Micah Gersten wrote:
The question is, why aren't you using a
On Sat, Oct 11, 2008 at 12:33 PM, Per Jessen [EMAIL PROTECTED] wrote:
Ben Stones wrote:
What I mean is I cannot use setcookie, I need to check if user
credentials are correct first (which is BEFORE setcookie) and if so,
set a cookie. I can't do that unless setcookie is first, but I need
The question is, why aren't you using a session variable instead of
cookies? That's one of the greatest features of PHP.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Ben Stones wrote:
What I mean is I cannot use setcookie, I need to check if user
Ben Stones wrote:
I'm using cookies for my website script and upon users logging in a
cookie is set. Problem for me is that the cookie doesn't work due to
headers already sent. Is there anyway of fixing this because, there is
no possible way of adding setcookie() to the top of the PHP file
What I mean is I cannot use setcookie, I need to check if user credentials
are correct first (which is BEFORE setcookie) and if so, set a cookie. I
can't do that unless setcookie is first, but I need to check if the user
credentials is correct. Furthermore I cannot use setcookie in the header as
I
Ben Stones wrote:
What I mean is I cannot use setcookie, I need to check if user
credentials are correct first (which is BEFORE setcookie) and if so,
set a cookie. I can't do that unless setcookie is first, but I need to
check if the user credentials is correct. Furthermore I cannot use
body
?php setcookie('test', 45, time()+(60*60*24*7)); ?
from the doc:
Cookies are part of the HTTP header, so setcookie() must be called before
any output is sent to the browser. This is the same limitation that header()
has.
http://ca.php.net/cookies
-
On Wed, 12 Mar 2008, Tim Daff wrote:
Hi,
I am learning PHP, I am trying to set a simple cookie:
html
head
titleCookies/title
/head
body
?php setcookie('test', 45,
time()+(60*60*24*7)); ?
/body
/html
Firefox is returning
Firefox is returning this error:
Warning: Cannot modify header information - headers already sent by
(output started at /Users/Daff/Sites/php_sandbox/cookies.php:7) in
/Users/Daff/Sites/php_sandbox/cookies.php on line 7
You must use set cookie() before you send any output to the browser,
Tim Daff wrote:
Hi,
I am learning PHP, I am trying to set a simple cookie:
html
head
titleCookies/title
/head
body
?php setcookie('test', 45, time()+(60*60*24*7)); ?
/body
/html
Firefox is returning this error:
Warning: Cannot modify header
Even you cant put a space before ?php tag.
the following code will throw the same error.
| ?php
| setcookie();
| ?
Because I prepend a space for each line
But this will be okay
|?php
| setcookie();
| ?
This is a very common mistake and very very hard to find.
On Wed, Mar 12, 2008 at 7:53 AM,
Wolf wrote:
Tim Daff wrote:
Hi,
I am learning PHP, I am trying to set a simple cookie:
html
head
titleCookies/title
/head
body
?php setcookie('test', 45, time()+(60*60*24*7)); ?
/body
/html
Firefox is returning this error:
Warning: Cannot
As a dirty trick you can put following line on the top of your script,
it will work
ob_start();
But you should try to know why it is not working, and what exactly
ob_start will impact your application and What is the thing called
Output Buffering.
Zareef Ahmed
On 3/12/08, Hiep Nguyen [EMAIL
On Sun, August 13, 2006 2:20 am, Peter Lauri wrote:
[snip]
On Sat, August 12, 2006 8:00 am, Peter Lauri wrote:
When you just use time() you tell the cookie to just live until now,
so it
dies directly. You have to add some seconds to determine how long
the
cookie
will live.
[snip]
On Sat, August 12, 2006 8:00 am, Peter Lauri wrote:
When you just use time() you tell the cookie to just live until now,
so it
dies directly. You have to add some seconds to determine how long the
cookie
will live.
Unfortunately, no...
The above solution relies on the USER computer
When you just use time() you tell the cookie to just live until now, so it
dies directly. You have to add some seconds to determine how long the cookie
will live.
/Peter
-Original Message-
From: BBC [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 12, 2006 7:48 PM
To: PHP
Subject:
Peter Lauri wrote:
When you just use time() you tell the cookie to just live until now, so it
dies directly. You have to add some seconds to determine how long the cookie
will live.
/Peter
-Original Message-
From: BBC [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 12, 2006 7:48 PM
On Sat, August 12, 2006 8:00 am, Peter Lauri wrote:
When you just use time() you tell the cookie to just live until now,
so it
dies directly. You have to add some seconds to determine how long the
cookie
will live.
Unfortunately, no...
The above solution relies on the USER computer clock
If this is the value directly from the cookie, it's an example of a
cross-site scripting (XSS) vulnerability.
header(Location: $HTTP_REFERER);
This is an HTTP response splitting vulnerability, because the Referer
header (like the Cookie header) is provided by the client. Future
versions
An interesting question in this case is how to do an injection using
cookies, injection attacks are generally performed using post get data
as they can be inserted to a link on another page. Getting a working
exploit would probably come down to how the browser implemented the
cookie security;
Which someone could do this, is another question I have. The user? He's do
something to his own computer, no?
Gerry
On 3/14/06, tedd [EMAIL PROTECTED] wrote:
Hi:
I've been using a php style switcher allowing users to change css.
The code follows:
Within the head tags.
link
tedd wrote:
link rel=stylesheet type=text/css media=screen href=?php
echo (!$thestyle)?'style1':$thestyle ?.css
It's not entirely clear from this example, but am I correct in assuming
that $thestyle is the same as $_COOKIE['thestyle'] in this case? In
other words, are you relying on
tedd wrote:
link rel=stylesheet type=text/css media=screen href=?php
echo (!$thestyle)?'style1':$thestyle ?.css
It's not entirely clear from this example, but am I correct in
assuming that $thestyle is the same as $_COOKIE['thestyle'] in this
case? In other words, are you relying on
I'm using
setcookie($sessionName, $sessionid, time()+60*60*24*1,
$sessionCookie['path'], $sessionCookie['domain'],
$sessionCookie['secure']);
to, obviously, store a session.
Also, I only use session_start() so perhaps I'm supposed to call
session_id()?
I'm not sure why the cookie is
I'm trying to setcookie('username',$username,15552000) but on
subsequent pages $_COOKIE('username') is always null.
I verified that I'm setting it before any other output is sent to
the browser. I verified that $username does have some valid
contents. I also verified that the browsers I'm
Brian Dunning wrote:
I'm trying to setcookie('username',$username,15552000) but on
subsequent pages $_COOKIE('username') is always null.
snip
Is that just a typo? It should be $_COOKIE['username']
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing
On Oct 6, 2005, at 7:28 AM, John Nichel wrote:
Is that just a typo? It should be $_COOKIE['username']
Oops, yes, that was my typo in the email - it is correctly $_COOKIE
['username'] in the code. Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Unless I'm mistaken, you appear to be setting the Expiration date of the
cookie to Mon, 29 Jun 1970 17:00:00 -0700.
Which would cause the cookie to be unset, if it were already set, and do
nothing otherwise.
Chris
Brian Dunning wrote:
I'm trying to setcookie('username',$username,15552000)
Good catch, Chris. I was wondering about that myself but hadn't taken the time
to see if setcookie() used regular serial time or if cookies had another time
standard.
echo date(m/d/Y h:i:s, 15552000);
06/29/1970 08:00:00
That's what I get.
-TG
= = = Original message = = =
Unless I'm
D'Oh! You guys are absolutely right. I was trying to go for 6 months,
which works now if I say time()+15552000 instead of 15552000. And the
documentation shows that exactly - apparently I read right over it,
even though I studied it minutely before posting.
Oh well...my wife would have the
On Thu, October 6, 2005 9:11 am, Brian Dunning wrote:
I'm trying to setcookie('username',$username,15552000) but on
subsequent pages $_COOKIE('username') is always null.
I verified that I'm setting it before any other output is sent to the
browser. I verified that $username does have some
John Hinton wrote:
The thing is, on the next action switch
print_r($_COOKIE);
returns empty until I refresh the browser. So, thusly, the second page
load brings in the cookies.
$_COOKIES is a convenient array that contains the contents of the Cookie
header, nicely parsed.
Whenever you set a
John Hinton wrote:
Seems my old setcookie scripts are busted in php with globals off.
Use $_COOKIES['name'].
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Chris Shiflett wrote:
John Hinton wrote:
Seems my old setcookie scripts are busted in php with globals off.
Use $_COOKIES['name'].
Chris
The thing is, on the next action switch
print_r($_COOKIE);
returns empty until I refresh the browser. So, thusly, the second page
load brings in the cookies.
Randy Johnson wrote:
setcookie( sess_key,$key,0,/,. . str_replace(
www,,$_SERVER[SERVER_NAME] ),0 );
Does that look right?
No.
if $_SERVER[SERVER_NAME] == 'www.domain.com'
. . str_replace(www,,$_SERVER[SERVER_NAME] )
will give you ..domain.com
--
PHP General Mailing List (http://www.php.net/)
To
ok I see how that could be an issue.
Here is my big problem that I have not been able to figure out.
I have a client website that I am trying to fix
1. it has sessions in database, and uses set cookie
2. I can login with firefox/netscape/mozilla just fine
3. I cannot login with any version of
The period was the issue all together, i took the extra out and it
worked. Thanks for your help
Randy
Randy Johnson wrote:
ok I see how that could be an issue.
Here is my big problem that I have not been able to figure out.
I have a client website that I am trying to fix
1. it has sessions in
On Mon, 24 Jan 2005 07:24:19 -0800 (PST), Reza Milan
[EMAIL PROTECTED] wrote:
Dear sir,
When I use setcookie command I recieve the following message error:
Warning: Cannot modify header information - headers already sent by (output
started at C:\Inetpub\wwwroot\test.php:9) in
Reza Milan wrote:
Dear sir,
When I use setcookie command I recieve the following message error:
Warning: Cannot modify header information - headers already sent by
(output started at C:\Inetpub\wwwroot\test.php:9) in
C:\Inetpub\wwwroot\test.php on line 15
WinXp - IE 6
On Localhost and
$ok = setcookie(client_id, argh, 259300); //* expire in a month ish
Nope, it expired a long time ago... :-)
Read the manual for setcookie:
http://php.libero.it/manual/en/function.setcookie.php (mainly the part about
the expire parameter)
HTH, cheers
Silvio
--
PHP General Mailing List
doh!!
ta ;-)
S
ilvio Porcellana wrote:
$ok = setcookie(client_id, argh, 259300); //* expire in a month ish
Nope, it expired a long time ago... :-)
Read the manual for setcookie:
http://php.libero.it/manual/en/function.setcookie.php (mainly the part about
the expire parameter)
HTH, cheers
Silvio
--
to
verify everything works. I just don't get what the problem is with this not
working.
David
-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 12:08 PM
To: Shapiro, David; [EMAIL PROTECTED]
Cc: Perry, Joe (ITCD)
Subject: Re: [PHP] Setcookie
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 7:20 PM
To: '[EMAIL PROTECTED]'
Subject: Re: [PHP] Setcookie variable use issue after moving php app to di
fferent server
* Thus wrote Shapiro, David:
You certainly know your stuff. Unfortunatley, it says that is uses
/etc/php.ini, which
From: Shapiro, David
We are trying to move our php app to a different server.
For some reason, when we type in the login/password/
account number info and click submit, it does not seem
to set the variables.
The magic 8-ball says register_globals is OFF on the new server...
---John Holmes...
your message is multipart/alternative - please do not send them to
mailing lists.
your signatue should have '--' on a line before it's start.
you might want to read the newby guide and try again.
Shapiro, David wrote:
Hello,
We are trying to move our php app to a different server. For some
(ITCD)
Subject: Re: [PHP] Setcookie variable use issue after moving php app to
different server
From: Shapiro, David
We are trying to move our php app to a different server.
For some reason, when we type in the login/password/ account number
info and click submit, it does not seem to set
From: Shapiro, David [EMAIL PROTECTED]
Thanks for pointing in the hopefully the right direction. I see in
/etc/php.ini the following:
; - register_globals = Off [Security, Performance]
I put below this line:
register_globals = On
And I restarted apache. However, it did not seem to
; [EMAIL PROTECTED]
Cc: Perry, Joe (ITCD)
Subject: Re: [PHP] Setcookie variable use issue after moving php app to
different server
From: Shapiro, David [EMAIL PROTECTED]
Thanks for pointing in the hopefully the right direction. I see in
/etc/php.ini the following:
; - register_globals = Off
From: Shapiro, David [EMAIL PROTECTED]
You certainly know your stuff. Unfortunatley, it says that is uses
/etc/php.ini, which I did modify, but it also reports register_globals as
still off too. It does show a scan dir for additional .ini files
(/etc/php.d and additional ini files parsed as
Yes, I am afraid so. Both are marked as off.
-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 12:08 PM
To: Shapiro, David; [EMAIL PROTECTED]
Cc: Perry, Joe (ITCD)
Subject: Re: [PHP] Setcookie variable use issue after moving php app
* Thus wrote Shapiro, David:
You certainly know your stuff. Unfortunatley, it says that is uses
/etc/php.ini, which I did modify, but it also reports register_globals as
still off too. It does show a scan dir for additional .ini files
(/etc/php.d and additional ini files parsed as ldap.ini,
* Thus wrote Ryan Schefke ([EMAIL PROTECTED]):
cannot modify header errors, which tells me there's nothing wrong with my
main script. Am I doing something wrong with cookies here?
Warning: Cannot modify header information - headers already sent by.
You're missing the most important
, April 14, 2004 3:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] setcookie statements are giving me error
* Thus wrote Ryan Schefke ([EMAIL PROTECTED]):
cannot modify header errors, which tells me there's nothing wrong with my
main script. Am I doing something wrong with cookies here
Send some pieces of code.
Daniel E Massón.
Ingeniero de desarrollo
[EMAIL PROTECTED]
Imagine S.A.
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia
- Soluciones web para
This is with PHP 4.2 and register_globals off.
I am setting cookies and starting a session in the following fashion:
setcookie(EMAILADDR, $row[EMAIL], time()+2592000, '/', .$dn);
where $dn = mydomain.com
I want the cookies accessible sitewide .. at www.mydomain.com, mydomain.com,
On Wednesday 12 February 2003 05:44, Chad Day wrote:
This is with PHP 4.2 and register_globals off.
I am setting cookies and starting a session in the following fashion:
setcookie(EMAILADDR, $row[EMAIL], time()+2592000, '/', .$dn);
where $dn = mydomain.com
I want the cookies accessible
at newmediaone.net
(303)828-9882
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 11, 2003 10:14 PM
Subject: Re: [PHP] setcookie() in various browsers.. 3rd followup.. anyone?
On Wednesday 12 February 2003 05:44, Chad Day wrote:
This is with PHP 4.2
Following up from Friday.. no replies over the weekend.. can anyone help?
Thanks,
Chad
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 3:02 PM
To: php general
Subject: [PHP] setcookie() in various browsers..
This is with PHP 4.2 and
Unless I am mistaken, the typical behavior for most browsers is exactly
as you described. Which is due to the browser receiving a Location
header and acting on it, disregarding any other headers. (ex:
cache/no-cache, cookies, etc)
Anybody care to prove me wrong?
While not the best route, you
On Tue, 14 Jan 2003 22:34:49 -0700, you wrote:
Unless I am mistaken, the typical behavior for most browsers is exactly
as you described. Which is due to the browser receiving a Location
header and acting on it, disregarding any other headers. (ex:
cache/no-cache, cookies, etc)
Anybody care
Accidentally replied to sender instead of list
--
Wow. You hit the nail on the head. :)
I installed PHP on IIS via the executable, so I gather I have one of two
choices:
-- Research your article and see how to work around the problem
OR
-- Use ISAPI. (how
On Wed, 15 Jan 2003 01:36:26 -0500, you wrote:
Wow. You hit the nail on the head. :)
Well, I spent a good day or two hunting the problem down the first
time I ran across it. Spending that much time on something tends to
make it stick in your head. :)
I installed PHP on IIS via the
MS has introduced p3p policy in IE6 which has impacted on cookies etc. If
the site or host does not have a machine generated xml privacy statement,
then stability with regards
to cookies is not guaranteed. Do a search and read up about it. Check out
w3c's site.
- Original Message -
From:
Thanks for the reply, a little more info below...
Speaking of cookies, any general thoughts on the relative merits of using
php's setcookie function vs. setting a cookie with a header() call? Are
both methods equal?
Will do more research later and post anything interesting on the IE6
Read your data from $_COOKIE not $_COOKIES.
David Busby wrote:
List,
I'm trying to set a cookie like this:
?php
function redirect() {
if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) {
$to = func_get_arg(0);
header(HTTP/1.1 301\n);
David Busby wrote:
List,
I'm trying to set a cookie like this:
?php
function redirect() {
if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) {
$to = func_get_arg(0);
header(HTTP/1.1 301\n);
header(Location:http://.$_SERVER['SERVER_NAME'].$to.\n);
Hello jtjohnston,
Saturday, May 11, 2002, 11:42:52 PM, you wrote:
j This is a bug Feature/Change Request I made to:
j http://bugs.php.net/bug.php?id=17158
j setcookie() states cookies must be sent before any other headers
j are sent (this is a restriction of cookies, not PHP).
j I argue this
Yes. Output buffering is good.
Some people will say that you shouldn't use it, but should make sure to
write all your code so that there can't be any output before any headers
need to be sent. I disagree with this. While a good idea in principle,
in practice it is all but impossible to keep
PHP is a server-side language and as such it deals with server-side
issues. If you want to write javascript that sets a client-side
Javascript cookie, go ahead. It has nothing to do with PHP and PHP will
certainly not get in your way.
-Rasmus
On Sat, 11 May 2002, jtjohnston wrote:
This is a
Rasmus
server-side / client-side, that's not the point.
My point is PHP can, could and should be able to set a cookie after HTML is
set.
But of course, Jan has already closed the issue, as usual.
http://bugs.php.net/bug.php?id=17158
PHP is a server-side language and as such it deals with
If the issue has pissed you off in tha past,
complain. Vote: http://bugs.php.net/bug.php?id=17158
Rasmus
server-side / client-side, that's not the point.
My point is PHP can, could and should be able to set a cookie after HTML is
set.
But of course, Jan has already closed the issue, as
And you can do so if you turn on output buffering. Having PHP send off
JavaScript to do this is a massive hack that has no place in PHP. Write
your own setcookie wrapper function if that is what you want.
-Rasmus
On Sat, 11 May 2002, jtjohnston wrote:
Rasmus
server-side / client-side,
You've just pointed out that you're a clueless newbie, that's' all, and
can't read a spec worth a whit.
-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 11, 2002 4:50 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] setcookie()
Rasmus
server-side / client
On Sat, 11 May 2002, jtjohnston wrote:
This is a bug Feature/Change Request I made to:
http://bugs.php.net/bug.php?id=17158
setcookie() states cookies must be sent before any other headers
are sent (this is a restriction of cookies, not PHP).
I argue this is a restriction of PHP, not
On Wednesday, April 24, 2002, at 03:27 PM, Pusta wrote:
When we are setting a cookie in a PHP page, that cookie cannot be
accessed
by any page in a different folder. When we move the pages into the same
folder, the cookies worked fine. Can anyone shed some light on this??
Is the
for more: www.php.net/setcookie
Sincerely,
Maxim Maletsky
Founder, Chief Developer
www.PHPBeginner.com // where PHP Begins
-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 9:32 PM
To: Pusta
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP
On Thursday 28 March 2002 23:25, Rodrigo Peres wrote:
Hi list,
Regarding my last post about serialize, I've tried many things but couldn't
make it function.
I'm trying to store the data from a form in order to allow my user to stop
the process of filling the form and retrieve later what
On Thu, 28 Mar 2002, Rodrigo Peres wrote:
if(isset($submit)) {
$x = addslashes($HTTP_POST_VARS);
$y = serialize($x);
setcookie(posted,$y)
}
1) You probably should call serialize on the array to turn it into a
string before trying any string transformations like addslashes. If
Here's a compilation of some recent conclusions I've gotten from the same
discussion:
This is how I chose to set the variables:
// $username and $password are passed from a previous page's form.
$time = mktime()+1800;
$date = gmdate(D, d-M-Y H:i:s, ($time));
$password = md5 ($password);
Oh yeah, about the lifetime of the cookie - with no valid expiry time it is
created as a session cookie - which is supposed to only live as long as the
browser does.
[opening a new independent browser window does not share the session, but
window.open() calls do, as do other 'browser created
On 29 December 2001 13:35, Kris Wilkinson spaketh unto ye recipient:
setcookie (myCookie,Blah,time()+7201);
For some reason, you must specify the domain, and make sure you use *exact*
formatting on the time, including the GMT suffix.
I gave up on setcookie and started using this:
$date =
SetCookie() cannot know whether the client accepts the cookie or not. It
can only send it. You will need to check in a subsequent request if the
client decided to accept it or not.
-Rasmus
On Sat, 10 Nov 2001, Christian Dechery wrote:
what does SetCookie() returns???
I did a var_dump()
?php
$alertthem = Testing your browser for cookies.;
if(empty($check)){
$page = $PHP_SELF?check=1;
header(Location: $page);
setcookie(testcookie,1);
}
else{
if(empty($testcookie)){
$alertthem = H3Please enable cookies.brYou need cookies to shop
On Monday 02 July 2001 21:32, scott [gts] wrote:
probably becuase time() is seconds since 1970, and as
far as i understand, once it gets over 999,999,999
it will not work correctly becuase it will roll over
(similar to the Y2k bug) and become 000,000,000
Typically the limit is 2^31 seconds
this is my guess at what's happening... i dont know
100% if that's why cookies aren't setting properly,
but here's an educated guess on my part:
probably becuase time() is seconds since 1970, and as
far as i understand, once it gets over 999,999,999
it will not work correctly becuase it will
In my experience the understanding of SetCookie header differs form browser
to browser so much that it's horrible.
As far as I remember IE5.5 handled it correctly. IE5.0 didn't. Netscape I
think did (not completely sure).
In any case .. session-based cookies seem to work in all of them. just call
I won't quote, because this is not directly related to either mail.
I had a completely bizarre issue with MSIE not accepting cookies that
had highbit ascii values in them as their first character. Simply
fixed (in the end): add text to the front and strip it out in the
sitewide pre-execution
This is a problem with IE5.0. However, not all versions of 5.0 have the
problem. I had to upgrade all of my users to IE5.5 to fix the problem. What
is really strange is that the problem manifests itself as a PHP
problemBut it's not. Actually, I don't think the problem is the
setcookie
This is actually a security feature of cookies, so that domains that
dont match your cookie cannot read personal details set by another
site. Don't worry, its all in order ;)
Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk
-Original Message-
From: Tomaz Kovacic [mailto:[EMAIL
.
-Original Message-
From: Ray Hilton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 3:26 AM
To: 'Tomaz Kovacic'; [EMAIL PROTECTED]
Subject: RE: [PHP] SetCookie weirdness
This is actually a security feature of cookies, so that domains that
dont match your cookie cannot read
BTW here's my php.ini file. many thanks!
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 07, 2001 10:48 AM
Subject: [PHP] setcookie()
Hi all,
I have just migrated my scripts from redhat linux 6.2 and apache to win
nt4
and IIS 4.
I've been
If you just echo $userid you will get the results.
do this
setcookie ("cookie_variable", "chocalate chip", 1, "", "", 1);
echo $cookie_variable
You can name the cookie_variable whatever you want and that will be referenced
as the variable to store "chocalate chip".
Now if you want to see the
cheers Jack but Ive tried this and get the error msg:
Warning: Undefined variable: user_id in
C:/XITAMI/webpages/netrux/intothemain.php on line 14
so its not setting the varible by the looks of it any ideas? cheers
Jack Sasportas wrote in message
[EMAIL PROTECTED]...
If you just echo
Someone on this list mentioned, Internet Explorer does not accept cookie that
has timeout less than 7200 sec from current time. (PC's clock) How about try
longer timeout?
PS: Is this information is correct? Anyone? Correct me if it is wrong info.
--
Yasuo Ohgaki
""Sean Weissensee"" [EMAIL
you have to set to path and the domain name too...
setcookie('vote', '1', $time, '/', '.someite.com');
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
[EMAIL PROTECTED]
""Nuno Costa"" [EMAIL PROTECTED] wrote in message
96 matches
Mail list logo