> -----Original Message-----
> From: Wim Paulussen [mailto:[EMAIL PROTECTED]
> Sent: 11 June 2003 14:28
> 
> page 1 : login.php
> 
> input user name -> Post veriable
> input password-> post variable
> 
> page 2 : verify.php
> session_start()
> 
> // supposing name is entered
> if (!$_POST['password'] == "")

Strange syntax -- I'd prefer:

  if ($_POST['password'] != "")

> {
>       // verification against database
>       if (successfully authenticated)
>       {
>               $_SESSION['user']       = $_POST['user'];
>               header("location: authPage.php");

To cover all bases, you need to include the SID constant here, so it still
works for people who don't accept cookies.  Oh, and the header name must be
Location (note capital L) to conform with the standard, and the URL should
be an absolute one -- some fussy browsers won't do the redirection properly
if this isn't 100% correct:

        header("Location: http://your.site.name/path/to/authPage.php?".SID);

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211

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

Reply via email to