Re: registering session with user and password

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

 



Tomás Rodriguez Orta wrote:
> Hi, people.
> I want to register all session of my web sitie, by the way in my index web I
> register all user with your username and password
> session_start();
> $_SESSION['username']=$username;
> session_register('username');
> 

You should use $_SESSION *or* session_register() and (in your php.ini)
register_globals = true.  In my opinion I would just use
$_SESSION['username'] to store the data.

Then you should be able to do the following:

<?php

if $_SESSION['username'] {
  /* Do stuff */
} else {
  header("Location: http://webadmin/index.php";););
}

?>

-- 
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux