You are here: Re: [PHP] Best way to do this: www.domain.com?page=var « PHP « IT news, forums, messages
Re: [PHP] Best way to do this: www.domain.com?page=var

Posted by "M. Sokolewicz" on 10/04/50 11:37

I'm confused...
why does everyone use a refresh??? According to me, that's not what a
refresh is supposed to be used for (!). Why don't use a
header('Location: http://www.domain.com/start.php?page=home'); for it?
It's more in-line with RFC's

- tul


Ray Hauge wrote:
> You could also check to see if $_GET['page'] contains a value, and if it does
> not, then redirect it. Something like this:
>
> if($_GET['page'] == ''){
> header("Refresh: 0; URL=http://www.domain.com/start.php?page=home");
> }
>
> Granted that isn't validating the $_GET['page'] variable input for security,
> but that should at least get you going. Also, that assumes that all your
> pages use the GET query to specify which page they are on. If that's just
> for the initial page, then you'd have to do some more qualification.
>
> HTH
>

 

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

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