Re: Best way to do this: www.domain.com?page=var

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux