Re: [PHP] Setting a cookie and redirecting

2002-07-03 Thread Erik Price
On Tuesday, July 2, 2002, at 11:10 PM, Justin French wrote: > on 03/07/02 11:54 AM, Richard Lynch ([EMAIL PROTECTED]) wrote: > >> Rule of Thumb: >> If you have to do header("Location: ...") you have a >> design/engineering/organizational problem in your code/pages/site. >> >> I'm sure a zillio

Re: [PHP] Setting a cookie and redirecting

2002-07-03 Thread Cord Schneider
> No, it just happens to have sent them in the order his browser liked. > > ASP can't do anything "different" from PHP. > > I used to laugh when ASPers asked why PHP had to do all this extra stuff > with cookies and stuff to do sessions. Sigh. :-) > > Some browsers will process the headers in one

Re: [PHP] Setting a cookie and redirecting

2002-07-02 Thread Richard Lynch
>I don't agree with the general rule of thumb that the use of the >"Location" header is bad, but I have reviewed plenty of code where >people misuse it terribly, as a lazy goto-style operation. In most >cases, you do want to design your application to: >1) receive data >2) analyze data >3) resp

Re: [PHP] Setting a cookie and redirecting

2002-07-02 Thread Richard Lynch
>> If you have to do header("Location: ...") you have a >> design/engineering/organizational problem in your code/pages/site. >> >> I'm sure a zillion people will disagree with this "rule" > >I agree, except there's one exception to this that I can't see a way around. > >When dealing with form s

Re: [PHP] Setting a cookie and redirecting

2002-07-02 Thread Chris Shiflett
Justin French wrote: >on 03/07/02 11:54 AM, Richard Lynch ([EMAIL PROTECTED]) wrote: > > > >>Rule of Thumb: >>If you have to do header("Location: ...") you have a >>design/engineering/organizational problem in your code/pages/site. >> >>I'm sure a zillion people will disagree with this "rule"

Re: [PHP] Setting a cookie and redirecting

2002-07-02 Thread Justin French
on 03/07/02 11:54 AM, Richard Lynch ([EMAIL PROTECTED]) wrote: > Rule of Thumb: > If you have to do header("Location: ...") you have a > design/engineering/organizational problem in your code/pages/site. > > I'm sure a zillion people will disagree with this "rule" I agree, except there's one e

Re: [PHP] Setting a cookie and redirecting

2002-07-02 Thread Richard Lynch
>If you don't mind, I'm interested in learning more about what exactly >ASP does differently. Are there two HTTP responses sent? No, it just happens to have sent them in the order his browser liked. ASP can't do anything "different" from PHP. I used to laugh when ASPers asked why PHP had to do

Re: [PHP] Setting a cookie and redirecting

2002-07-02 Thread Chris Shiflett
Cord Schneider wrote: >Here is an outline of the problem: >1) client browser hits myPage.php >2) myPage.php does a few checks & recognises that this is a first visit >3) myPage.php sets a cookie using setCookie() >4) myPage.php redirects to checkBrow.php which uses JavaScript to do some >basic br

[PHP] Setting a cookie and redirecting

2002-07-02 Thread Cord Schneider
Hi all! Since I am new to PHP, I need the help of someone who is very familiar with the way PHP handles the setting of cookies and page redirection - in other words, an expert! Here is an outline of the problem: 1) client browser hits myPage.php 2) myPage.php does a few checks & recognises that