Re: [posibleOT] Forcing entering te site thru index.php
| From: | Website Managers.net | Date: | Sun, 21 Dec 2003 19:16:58 +0000 |
| Subject: | Re: [posibleOT] Forcing entering te site thru index.php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173108@lists.php.net to get a copy of this message | ||
Cookies are a possibility but not always functional. Many people have them shut off, or services
like WebTV do not support them. Two other possibilities are seccions and POST variables.
_SESSIONS_
forma2.php
if((!isset($_SESSION["username"]) || (!isset($_SESSION["password"])) {
header("Location:index.php");
}
__ POST __
// check to make sure username and password are entered and if so, they must match account
if ((!$_POST["username"]) || (!$_POST["password"]) ||
($_POST["username" != "myuser") || ($_POST["password"] !=
"mypassword"])) {
header("Location:index.php");
}
Jim
www.websitemanagers.net
----- Original Message -----
From: "Fernando M. Maresca" <f_maresca@ciudad.com.ar>
To: <php-general@lists.php.net>
Sent: Sunday, December 21, 2003 12:57 PM
Subject: [PHP] [posibleOT] Forcing entering te site thru index.php
| Hello everybody.
| Well, i'm trying to avoid access to the site for the middle. Say there
| is a initial page with a form and other pages that depends on this. Is
| there a way to force users access the site thru the initial form page,
| regardless of the url?
| Something like this:
| lynx http://mysite/forma2.php/
| produce the browser to redirect to
| http://mysite/index.php/
|
| Of course, the forma2.php must be served if its accesed after index.php.
| Thanks
|
| --
|
| Fernando M. Maresca
|
| Cel: (54) 221 15 502 3938
| Cel: 0221-15-502-3938
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php
|
|