You are here: Re: How to open another page by PHP « All PHP « IT news, forums, messages
Re: How to open another page by PHP

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]


Удаленная работа для программистов  •  Как заработать на 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

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