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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
| 
|

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to