|
Posted by J.O. Aho on 08/05/06 10:56
David wrote:
> On Sat, 05 Aug 2006 10:12:05 +0200, "J.O. Aho" <user@example.net>
> wrote:
>
>> Rik wrote:
>>> Hoopster wrote:
>>>> Hello,
>>>>
>>>>
>>>> I was wondering if I can add some code to let someone read something
>>>> on the screen, and after a few seconds it takes that person to another
>>>> webpage automatically.
>>>>
>>>>
>>>> example - contact us php script. Once the information has been
>>>> submitted it will take the user to a thank you page. Then it will
>>>> pause for a second and then redirect the user to the homepage.
>>>>
>>>>
>>>> Is that possible, if so can someone give me a code example.
>>> Normally this is done using the HTML meta refresh tag, with a link to click
>>> for users that don't allow a redirect.
>>>
>>> http://www.w3schools.com/html/tryit.asp?filename=tryhtml_redirect
>> header() can be used instead of the meta tags
>> http://www.php.net/manual/en/function.header.php
>
> header cannot be used after something was echoed to the screen
You can still send the header first and tell for a delay before loading next page.
header("Refresh: 10; URL=\"http://www.example.net/newpage.php\"");
//Aho
Navigation:
[Reply to this message]
|