RE: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread John W. Holmes
EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 9:16 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Help! Can't set cookie or redirect!!! > > Ok thanx.. yeah I knew that you can set a cookie before anything is set to > the browser, however, if you view my code, nothin

Re: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Phil Powell
;[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, September 28, 2002 9:09 PM Subject: RE: [PHP] Help! Can't set cookie or redirect!!! > You can only set a cookie before any output is send to the browser. A > newline, space, or , etc, is output to the browser. Redesign your >

Re: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Chris Shiflett
Phil Powell wrote: >Ok thanx.. yeah I knew that you can set a cookie before anything is set to >the browser, however, if you view my code, nothing is sent as output before >the cookie is set. > Yes, there is. Look at the following line in your code: > phpinfo(); > That comes prior to the setc

Re: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Chris Shiflett
Phil, You are sending output somewhere prior to the following line: header("Location: " . $HTTP_POST_VARS["refURL"]); Basically, as soon as you output anything, PHP has to assume you are finished manipulating headers. Output can be anything from a space, newline, or HTML. It is not your setc

Re: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Phil Powell
Ok thanx.. yeah I knew that you can set a cookie before anything is set to the browser, however, if you view my code, nothing is sent as output before the cookie is set. $val) { if (strcmp($key, "isDefaultLayout") == 0) $willChangeLayout = 0; if (!empty($HTTP_POST_VARS[$key])) $isEmptyLayo

RE: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread John W. Holmes
You can only set a cookie before any output is send to the browser. A newline, space, or , etc, is output to the browser. Redesign your code so the cookie is set before any output or use output buffering. ---John Holmes... > -Original Message- > From: Phil Powell [mailto:[EMAIL PROTECTED