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
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 bett
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 creden
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
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
>
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:
> 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
Hi,
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 when the cookie is
ho
Wolf wrote:
Tim Daff wrote:
Hi,
I am learning PHP, I am trying to set a simple cookie:
Cookies
Firefox is returning this error:
Warning: Cannot modify header information - headers already sent by
(output started at /Users/Daff/Sites/php
Tim Daff wrote:
Hi,
I am learning PHP, I am trying to set a simple cookie:
Cookies
Firefox is returning this error:
Warning: Cannot modify header information - headers already sent by
(output started at /Users/Daff/Sites/php_sandbox/c
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,
inc
Thank's for your help Zareef, Hiep, Shiplu and Jean-Christophe
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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 P
Daff <[EMAIL PROTECTED]>
> To: php-general@lists.php.net
> Sent: Wednesday, March 12, 2008 8:48:59 AM
> Subject: [PHP] setcookie
>
> Hi,
>
> I am learning PHP, I am trying to set a simple cookie:
>
>
>
>Cookies
>
>
>
>
>
On Wed, 12 Mar 2008, Tim Daff wrote:
Hi,
I am learning PHP, I am trying to set a simple cookie:
Cookies
time()+(60*60*24*7)); ?>
Firefox is returning this error:
Warning: Cannot modify header information - headers alr
f <[EMAIL PROTECTED]>
To: php-general@lists.php.net
Sent: Wednesday, March 12, 2008 8:48:59 AM
Subject: [PHP] setcookie
Hi,
I am learning PHP, I am trying to set a simple cookie:
Cookies
Firefox is returning this error:
Warn
Hi,
I am learning PHP, I am trying to set a simple cookie:
Cookies
Firefox is returning this error:
Warning: Cannot modify header information - headers already sent by
(output started at
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 compu
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 cloc
To: PHP
Subject: [PHP] SETCOOKIE
Hi List,
I want to set the cookie in which that cookie would be deleted automatically
as visitor closes the browser. I have read an article
from www.php.net/manual/en/function.setcookie and it is told me that we can
set that cookie by unset the value time, but it
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: [PHP
Hi List,
I want to set the cookie in which that cookie would be deleted automatically as
visitor closes the browser. I have read an article
from www.php.net/manual/en/function.setcookie and it is told me that we can
set that cookie by unset the value time, but it doesn't
work.
Example:
Setcooki
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; w
>>
>> 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 clie
tedd wrote:
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 register_globals or
assigning the value yourself?
If this is the value directly from the cookie, it's an
tedd wrote:
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 register_globals or assigning the value
yourself?
If this is the value directly from the cookie, it's an
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.
>
>
>
> W
> 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 cook
I'm using
setcookie($sessionName, $sessionid, time()+60*60*24*1,
$sessionCookie['path'], $sessionCookie['domain'],
$sessionCookie['secure']);
to, obviously, store a session. The problem is that this always times out
after 24 hours, and I can't figure out why.
Is there something I'm missing? ie
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
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
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 mist
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)
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: http://www.ph
Brian Dunning wrote:
I'm trying to setcookie('username',$username,15552000) but on
subsequent pages $_COOKIE('username') is always null.
Is that just a typo? It should be $_COOKIE['username']
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List
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 t
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 t
On Apr 6, 2005 2:30 PM, William Stokes <[EMAIL PROTECTED]> wrote:
>
> This doesn't set the cookie? Can you see why? I can't...
>
> $showbrowseteam = 'somejargon';
> setcookie("showbrowseteam","$showbrowseteam",0,"/");
>
> Thanks
> -will
>
> --
> PHP General Mailing List (http://www.php.net/)
>
This doesn't set the cookie? Can you see why? I can't...
$showbrowseteam = 'somejargon';
setcookie("showbrowseteam","$showbrowseteam",0,"/");
Thanks
-will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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 cooki
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.
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
Seems my old setcookie scripts are busted in php with globals off.
--begin code--
# LOGIN PAGE
###
function login(){
include ('config.php');
$query = "SELECT * FROM atable";
$result = mysql_db_q
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
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 IE
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 (
setcookie( "sess_key",$key,0,"/","." . str_replace(
"www","",$_SERVER["SERVER_NAME"] ),0 );
Does that look right?
Thanks!
Randy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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 Localho
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 C:\In
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 Server
Thanks
Reza M
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
Silv
>
> $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 Lis
I've got this function in a class object, however the cookie does not
set even though £ok returns true !!! I've got cookies enables on all my
borswers (firefox, mozilla, opera , IE)..
any ideas !!
function updateClient($arr){
extract($arr);
//print_r($arr);
$sql = "update clients set
n
[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
&
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] Setc
* 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.in
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 to
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 l
iro, David; [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 fol
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 res
(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 se
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
r
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...
-
Hello,
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 webpage portion
that collects the login/password/account looks like the
following:
ROTECTED]
Sent: Wednesday, 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 some
* 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 import
I'm trying to set multiple cookies and getting the error below. I removed
all of the white spaces and extra lines before and after my ,
so, that shouldn't be an issue. I get the error for each cookie and it
echoes back as "...cookie not set" like I coded.
This is the code chunk I'm trying to r
]
Asunto: [PHP] setcookie on PHP??
I need to set a cookie within a document in PHP? setcookie didn't work.
I guess it works only in PHP3 & PHP4
Any good ideas??
Thanks
Rave
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PH
I need to set a cookie within a document in PHP? setcookie didn't work. I guess it
works only in PHP3 & PHP4
Any good ideas??
Thanks
Rave
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
//www.newmediaone.net
webmaster "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 followu
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 a
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,
forums.myd
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
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,
forums.myd
Hi listers,
I have some webspace on a Unix server running apache. Things look like
this there:
Path to dir with files - /home/username/public_html/
URL - www.somesite.net/~username
setcookie("id",$randval,time()+3600,"Q1","Q2",0);
What do I plug into Q1 and Q2? I want to set cookie for only my
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 executabl
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 d
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 c
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
After I set a cookie and then send a redirect header, the cookie doesn't
show up, but the browser successfully redirects.
setcookie("test", "blahblah", time() + 1440);
header("Location: http://www.mywebsite.com/login.php";);
However, if I take out the header() statement, then the cookie is
succes
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: "Javier Montserat" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTEC
From: "Javier Montserat" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 1:39 PM
Subject: [PHP] setcookie IE6 problem
> I'm setting a session cookie with the following code -
>
> function setSessionCookie(){
>$expires = time
I'm setting a session cookie with the following code -
function setSessionCookie(){
$expires = time()+$this->session_expires;
$issetCookie = setcookie("$this->cookiename",
"$this->sess_id",
"$expires",
"/",
Can anyone tell me why the following setcookie()s fail?
- Tabzilla.com
--
-
[EMAIL PROTECTED]
http://www.cool-palace.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I need to create a cookie that is accessible from more than 1 application,
but on the same server. What would be the proper syntax? What I tried was
setcookie ("myCookie","$cookie_value",$timeToExpire,'/'); Right or wrong or
impossible? Should I not have used the "/"? Thanks.
--
Gaylen
PHP K
David Busby wrote:
> List,
> I'm trying to set a cookie like this:
> 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");
Read your data from $_COOKIE not $_COOKIES.
David Busby wrote:
> List,
> I'm trying to set a cookie like this:
> function redirect() {
> if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) {
> $to = func_get_arg(0);
> header("HTTP/1.1 301\n");
> header("Location
List,
I'm trying to set a cookie like this:
http://".$_SERVER['SERVER_NAME'].$to."\n");
header("Set-Cookie: sid=$sid;\n\n");
exit();
}
}
function login() {
[... validation code here ...]
// set my cookie
setcookie("sid", $sid);
I'm going over some code handed to me, a logout function:
function user_logout()
{
setcookie( 'user_name', '',(time()+28800), '/', '',0);
setcookie( 'id_hash', '',(time()+28800), '/', '',0);
}
Doesn't this mean the cookie will expire after 8 hrs? So what's this
really doing?
Moreover I fou
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 argu
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
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()
Ra
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, tha
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,
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 se
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
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 cookies.
Here is my proof:
http://www.college
OTECTED]]
Sent: Saturday, May 11, 2002 6:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] setcookie() in 4.2.0
The following code doesn't work properly on PHP 4.1:
Blah, blah";
setcookie("kuku", "abc");
setcookie("lala", "def");
setcookie("zuzu", "
The following code doesn't work properly on PHP 4.1:
Blah, blah";
setcookie("kuku", "abc");
setcookie("lala", "def");
setcookie("zuzu", "ghi");
?>
Because I wrote echo statement before setcookie. But it works on PHP
4.2. Is it due to "output_buffering=4096" directive in php.ini?
--
Best regard
1 - 100 of 139 matches
Mail list logo