|
Posted by Nadine St-Amand on 10/02/11 11:19
TekWiz wrote:
> this is what i do, first thing:
> if (validate($_SESSION[var])) {
> [echo the complete page]
> } else die(header("Location: $login_page_url"));
>
> Make sure you read up on the header() function: http://www.php.net/header
>
> --TekWiz
If you write it like this, you keep the code cohesive
(i means, all auth code together, application code together):
if (!validate($_SESSION[var])) die(header("Location: $login_page_url"));
[echo the complete page]
--
Nadine St-Amand
Code generator sql2php : http://www.phpbackend.com/
Navigation:
[Reply to this message]
|