Re: header() not working?
| From: | Tedd Sperling | Date: | Wed, 14 Dec 2016 15:36:35 +0000 |
| Subject: | Re: header() not working? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325897@lists.php.net to get a copy of this message | ||
> On Dec 14, 2016, at 9:52 AM, Tedd Sperling <tedd@sperling.com> wrote:
>
>> On Dec 13, 2016, at 5:13 AM, Ford, Mike <M.Ford@leedsbeckett.ac.uk> wrote:
>>
>> What's does include('includes/header.php') do? I'm betting there's
>> output in there! If so, put it inside your
>>
>> if ($step == 0)
>>
>> where it belongs anyway.
>
>> (As does the include of footer.php, incidentally.) There's no point putting anything
>> that might possibly do output in a path that can issue a redirect, so don't.
>>
Mike:
Your comment was right-on about the code. I’ve changed it and it works now. You can review here:
http://citw.lcc.edu/~sperlt/citw185/examples/redirect.php
I believe the “change” was in an update to PHP that no longer permitted using “header" as
I did. The confusing part for me was that it actually did work before the update.
Even us old dogs can learn — thanks for the lesson.
Cheers,
tedd
_______________
tedd sperling
tedd@sperling.com