You are here: Re: PHP Redirect « PHP Programming Language « IT news, forums, messages
Re: PHP Redirect

Posted by Carl Pearson on 01/16/07 17:38

John wrote:
> Hello,
>
>
> I have a php contact script and I want it to redirect to my homepage
> without using the standard header command.
>
>
> <?php
> header("location:http://www.johndoe.com/index.html");
> exit;
> ?>
>
>
>
>
> Does anyone know a way to do this?

You could do it on the client via javascript, but that would mean an
additional call to the server (assuming the redirection is going to
somewhere else on the same site):

function Redirect($Url = "/")
{
echo "<script
language='JavaScript'>document.location.href='".$Url."'</script>";
exit;
}

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация