sessions for default user auth. system?
Posted: Tue Jun 25, 2002 8:05 pm
can sessions be used as a login/ register system? i mean, can you have multiple users login?
pretend you do this:
Logged.php>>
<?
if($submit) {
session_start();
session_register(user);
session_register(pass);
{
echo "Welcome $user, you are now logged in.<p>";
?>
without the "if name=/ if password="
would it do much different, and would this work for a user authentication script?
you would be able to send them across your site with a username, they choose, and will keep it until they log out.
of course, you wouldnt be able to restrict them from viewing pages without using flat-file or mysql, but it would atleast give them a chance to personalize their experience.
you could enter:
Name:
Password:
E-mail:
Website:
your first visit to the site, and then use them forever until you log out
or is there restrictions on how long sessions last? do they reset when you close the browser?
pretend you do this:
Logged.php>>
<?
if($submit) {
session_start();
session_register(user);
session_register(pass);
{
echo "Welcome $user, you are now logged in.<p>";
?>
without the "if name=/ if password="
would it do much different, and would this work for a user authentication script?
you would be able to send them across your site with a username, they choose, and will keep it until they log out.
of course, you wouldnt be able to restrict them from viewing pages without using flat-file or mysql, but it would atleast give them a chance to personalize their experience.
you could enter:
Name:
Password:
E-mail:
Website:
your first visit to the site, and then use them forever until you log out
or is there restrictions on how long sessions last? do they reset when you close the browser?