Posted by NC on 02/02/06 20:54
Stefan Mueller wrote:
>
> Within PHP I'd like to do a test and if the test is true I'd like to open
> another page.
>
> <?php
> if (!isset($_SESSION['my_session_variableberechtigung'])) {
> --> open page 'login.php'
> }
> ?>
>
> How can I open another page by PHP?
Define "open another page"... Here are your options:
1. You can include the target page into your current page:
if (!isset($_SESSION['my_session_variableberechtigung'])) {
include 'login.php';
}
2. You can redirect the client to the target page:
if (!isset($_SESSION['my_session_variableberechtigung'])) {
header('Location: login.php');
}
Cheers,
NC
Navigation:
[Reply to this message]
|