RE: Login script help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Miles.

That works nicely.

Regards


-----Original Message-----
From: Miles Thompson [mailto:miles@xxxxxxxxxxxxxxxxx] 
Sent: Thursday, December 21, 2006 10:29 PM
To: php-db@xxxxxxxxxxxxx
Subject: RE:  Login script help


When user has authenticated successfully, start a session with an 
authentication key - almost anything you want.

After that, any page you want to protect you just put one line at the
top 
to check for the presence of this value; redirect to login page if it's
not 
there.

Regards - Miles


At 11:19 PM 12/21/2006, Haig Dedeyan wrote:

>Thanks.
>
>If I do it that way, can't someone get into the index page if they link
>directly to it without having to log in?
>
>
>
>-----Original Message-----
>From: Bastien Koert [mailto:bastien_k@xxxxxxxxxxx]
>Sent: Thursday, December 21, 2006 7:36 PM
>To: Haig Dedeyan; php-db@xxxxxxxxxxxxx
>Subject: RE:  Login script help
>
>why not just create a simple single logon page and not include
>it....then on
>sucessful login, redirect the user to the index page?
>
>bastien
>
>
> >From: "Haig Dedeyan" <haig@xxxxxxxxxxxx>
> >To: <php-db@xxxxxxxxxxxxx>
> >Subject:  Login script help
> >Date: Thu, 21 Dec 2006 16:36:11 -0500
> >
> >Hi everyone,
> >
> >My 1st attempt at creating a login script isn't going so good, so
> >hopefully someone can help me out.
> >
> >The login script itself works fine but when I include it into a web
> >page, the login.php script shows up but the entire index.html page
also
> >shows up.
> >
> >I just want people to log in before they get to index.html.
> >
> >Index.html starts off with:
> >
> ><?php
> >session_start();
> >include("database.php");
> >include("login.php");
> >?>
> >
> >I'm using php5.
> >
> >Thanks
> >
> >Haig
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>_________________________________________________________________
>Off to school, going on a trip, or moving? Windows Live (MSN) Messenger
>lets
>you stay in touch with friends and family wherever you go. Click here
to
>
>find out how to sign up!  http://www.telusmobility.com/msnxbox/
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.26/594 - Release Date:
12/20/2006

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

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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux