Re: Redirection if a condition is met
- From: "Jean-Baptiste Nizet" <jnizet@xxxxxxxxx>
- Date: 28 Jul 2005 01:47:16 -0700
Is http://linux-place.com the URL of the login page?
If it is, why not passing the message to this URL (or a message key):
<?php
session_start();
if (!isset($_SERVER['username']) or !isset($_SERVER['password'])) {
header("location:http://linux-place.com?messageKey=loginBeforeAdminPanel");
exit;
}
?>
and, in the login PHP page :
<?php
$message = getMessageFromKey($_GET["messageKey"]);
// display the message
// display the login form
?>
You should even pass the URL of the page requested before the redirect
to the login page, and redirect to this URL once the login is
successful. (Or put this URL in the session before the redirect to the
login page, and redirect to this URL after the login is successful).
JB.
.
- Follow-Ups:
- Re: Redirection if a condition is met
- From: aeldaly
- Re: Redirection if a condition is met
- References:
- Redirection if a condition is met
- From: aeldaly
- Redirection if a condition is met
- Prev by Date: Re: Script preview
- Next by Date: Re: i\'m or i\'d
- Previous by thread: Re: Redirection if a condition is met
- Next by thread: Re: Redirection if a condition is met
- Index(es):
Relevant Pages
|