Re: registering session with user and password
| From: | Jason Barnett | Date: | Tue, 05 Apr 2005 21:58:57 +0000 |
| Subject: | Re: registering session with user and password | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212311@lists.php.net to get a copy of this message | ||
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: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc