Re: [posibleOT] Forcing entering te site thru index.php
| From: | Fernando M. Maresca | Date: | Sun, 21 Dec 2003 19:28:24 +0000 |
| Subject: | Re: [posibleOT] Forcing entering te site thru index.php | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173109@lists.php.net to get a copy of this message | ||
On Sun, Dec 21, 2003 at 01:16:58PM -0600, Website Managers.net wrote:
> 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");
> }
Thanks, Jim.
Yes, i'm doing something like that: i'm propagating a string thru
$_SESSION that is set up in the first page and is valid until session
expires or init page is reloaded.
But i think that may be another (and better) way to do this, and can't
figure out how.
>
> Jim
> www.websitemanagers.net
Fernando M. Maresca
Cel: (54) 221 15 502 3938
Cel: 0221-15-502-3938