This is a discussion on cookies appearing in browser within the PHP Language forums, part of the PHP Programming Forums category; Hi! I have a php website that is showing cookies on screen instead of processing them. When I do a '...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi!
I have a php website that is showing cookies on screen instead of processing them. When I do a 'view source' I get the following: --- Set-Cookie: newsflashcookie=OA%3D%3D Set-Cookie: sessioncookie=VxvJ987SdY5AaGzRp9U5UlZTLFc8Tpdz1065 291948 Set-Cookie: detection=detected Content-type: text/html <html> <head> <title> </title> : : --- Any ideas? Thanks, /Mark |
|
|||
|
On 3 Oct 2003 11:38:18 -0700, ennism@yahoo.co.uk (Mark Ennis) wrote:
>I have a php website that is showing cookies on screen instead of >processing them. When I do a 'view source' I get the following: > >--- >Set-Cookie: newsflashcookie=OA%3D%3D >Set-Cookie: sessioncookie=VxvJ987SdY5AaGzRp9U5UlZTLFc8Tpdz1065 291948 >Set-Cookie: detection=detected >Content-type: text/html > ><html> ><head> ><title> </title> >: >: >--- > >Any ideas? Source code demonstrating the problem? Usually this sort of thing is caught by PHP and it raises "Warning: Cannot modify header information - headers already sent". -- Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |
|
|||
|
"Mark Ennis" <ennism@yahoo.co.uk> wrote in message news:69610068.0310031038.7dba5f0d@posting.google.c om... > Hi! > > I have a php website that is showing cookies on screen instead of > processing them. When I do a 'view source' I get the following: > > --- > Set-Cookie: newsflashcookie=OA%3D%3D > Set-Cookie: sessioncookie=VxvJ987SdY5AaGzRp9U5UlZTLFc8Tpdz1065 291948 > Set-Cookie: detection=detected > Content-type: text/html > > <html> > <head> > <title> </title> > : > : > --- > > Any ideas? > > Thanks, > /Mark SetCookie ("lp0", "$lp0", time()+90000); SetCookie ("lp1", "$lp1", time()+90000); Args: value, var name, expiration works for me... HTH ~Duane Phillips. |
|
|||
|
"Duane Phillips" <askme@askme.askme> wrote in message
news:F6rfb.32486$%h1.22599@sccrnsc02... > > "Mark Ennis" <ennism@yahoo.co.uk> wrote in message > news:69610068.0310031038.7dba5f0d@posting.google.c om... > > Hi! > > > > I have a php website that is showing cookies on screen instead of > > processing them. When I do a 'view source' I get the following: > > > > --- > > Set-Cookie: newsflashcookie=OA%3D%3D > > Set-Cookie: sessioncookie=VxvJ987SdY5AaGzRp9U5UlZTLFc8Tpdz1065 291948 > > Set-Cookie: detection=detected > > Content-type: text/html > > > > <html> > > <head> > > <title> </title> > > : > > : > > --- > > > > Any ideas? > > > > Thanks, > > /Mark > > > SetCookie ("lp0", "$lp0", time()+90000); > SetCookie ("lp1", "$lp1", time()+90000); > > Args: value, var name, expiration > works for me... > > HTH > > ~Duane Phillips. > > Additionally, a SetCookie needs to be done before any headers or other output to the browser is sent. ~Duane Phillips. |