Home > Archive > PHP DB > September 2005 > Re: [PHP-DB] URL Forwarding in PHP...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PHP-DB] URL Forwarding in PHP...
|
|
| Joseph Crawford 2005-09-26, 6:56 pm |
| header("Location: http://www.php.net/");
note that this cannot be set once any output has been sent to the browser.
atleast not without using output buffering.
--
Joseph Crawford Jr.
Zend Certified Engineer
Codebowl Solutions, Inc.
1-802-671-2021
codebowl@gmail.com
| |
| Daryl Booth 2005-09-26, 6:56 pm |
| I'm new to PHP and so I don't understand what you mean by "note that this
cannot be set once any output has been sent to the browser. At least not
without using output buffering."
What do you mean by output buffering? I want the site to display a table
then forward to another site atomatically.
-----Original Message-----
From: Joseph Crawford [mailto:codebowl@gmail.com]
Sent: Montag, 26. September 2005 22:02
To: Daryl Booth; [PHP-DB] Mailing List
Subject: Re: [PHP-DB] URL Forwarding in PHP...
header("Location: http://www.php.net/");
note that this cannot be set once any output has been sent to the browser.
atleast not without using output buffering.
--
Joseph Crawford Jr.
Zend Certified Engineer
Codebowl Solutions, Inc.
1-802-671-2021
codebowl@gmail.com
| |
| Micah Stevens 2005-09-26, 6:56 pm |
| Okay, then you should use an HTML meta tag to forward.. uhh.. (looking it up
since I haven't done this in a while)
Here, try this:
http://www.billstclair.com/html-redirect.html
-Micah
On Monday 26 September 2005 1:10 pm, Daryl Booth wrote:
> I'm new to PHP and so I don't understand what you mean by "note that this
> cannot be set once any output has been sent to the browser. At least not
> without using output buffering."
>
> What do you mean by output buffering? I want the site to display a table
> then forward to another site atomatically.
>
> -----Original Message-----
> From: Joseph Crawford [mailto:codebowl@gmail.com]
> Sent: Montag, 26. September 2005 22:02
> To: Daryl Booth; [PHP-DB] Mailing List
> Subject: Re: [PHP-DB] URL Forwarding in PHP...
>
> header("Location: http://www.php.net/");
>
> note that this cannot be set once any output has been sent to the browser.
> atleast not without using output buffering.
>
> --
> Joseph Crawford Jr.
> Zend Certified Engineer
> Codebowl Solutions, Inc.
> 1-802-671-2021
> codebowl@gmail.com
| |
| Daryl Booth 2005-09-26, 6:56 pm |
| But I want to redirect to different places when the condition (if) is
different. The condition works but the conditional redirect doesn't. I tried
fopen() but that just sends the output to the variable as text.
-----Original Message-----
From: Micah Stevens [mailto:micah@raincross-tech.com]
Sent: Montag, 26. September 2005 22:20
To: php-db@lists.php.net
Subject: Re: [PHP-DB] URL Forwarding in PHP...
Okay, then you should use an HTML meta tag to forward.. uhh.. (looking it up
since I haven't done this in a while)
Here, try this:
http://www.billstclair.com/html-redirect.html
-Micah
On Monday 26 September 2005 1:10 pm, Daryl Booth wrote:
> I'm new to PHP and so I don't understand what you mean by "note that this
> cannot be set once any output has been sent to the browser. At least not
> without using output buffering."
>
> What do you mean by output buffering? I want the site to display a table
> then forward to another site atomatically.
>
> -----Original Message-----
> From: Joseph Crawford [mailto:codebowl@gmail.com]
> Sent: Montag, 26. September 2005 22:02
> To: Daryl Booth; [PHP-DB] Mailing List
> Subject: Re: [PHP-DB] URL Forwarding in PHP...
>
> header("Location: http://www.php.net/");
>
> note that this cannot be set once any output has been sent to the browser.
> atleast not without using output buffering.
>
> --
> Joseph Crawford Jr.
> Zend Certified Engineer
> Codebowl Solutions, Inc.
> 1-802-671-2021
> codebowl@gmail.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
| |
| Micah Stevens 2005-09-26, 6:56 pm |
|
Sure it does:
<?php
if (<condition> ) {
echo "<META HTTP-EQUIV=\"Refresh\"
CONTENT=\"5; URL=html-redirect1.html\">";
} else {
echo "<META HTTP-EQUIV=\"Refresh\"
CONTENT=\"5; URL=html-redirect2.html\">";
}
?>
On Monday 26 September 2005 1:27 pm, Daryl Booth wrote:[color=darkred]
> But I want to redirect to different places when the condition (if) is
> different. The condition works but the conditional redirect doesn't. I
> tried fopen() but that just sends the output to the variable as text.
>
> -----Original Message-----
> From: Micah Stevens [mailto:micah@raincross-tech.com]
> Sent: Montag, 26. September 2005 22:20
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] URL Forwarding in PHP...
>
> Okay, then you should use an HTML meta tag to forward.. uhh.. (looking it
> up
>
> since I haven't done this in a while)
>
> Here, try this:
>
> http://www.billstclair.com/html-redirect.html
>
> -Micah
>
> On Monday 26 September 2005 1:10 pm, Daryl Booth wrote:
|
|
|
|
|