Re: user authentication problem

From: Date: Fri, 17 Nov 2000 10:23:01 +0000
Subject: Re: user authentication problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25887@lists.php.net to get a copy of this message
Check out j-sessions, it is nearly exactly what is seems you are doing. http://www.nirvani.net/software/j-sessions-1.0.0-pre1/ You should be able to hack enough out of it to do what you need. FYI, it is GPL'd. -jeremy brand http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more --------------------------------------------------------------------- We cannot do everything at once, but we can do something at once. -- Calvin Coolidge On Fri, 17 Nov 2000, Andres Montiel wrote: > Date: Fri, 17 Nov 2000 18:32:07 +0800 > From: Andres Montiel <kyutums@mypad.com> > To: PHP <php-general@lists.php.net> > Subject: [PHP] user authentication problem > > I'm trying to make a simple authentication script that would check a > user's userid and password against a database. > > The script is the following: > > > <?php > > require('global.inc.php'); > > if ($submit) { > > $result = mysql_query("SELECT * FROM users WHERE userid='$userid' and > password='$password'"); > > if ($result) { > echo "Statement 1"; > } > else { > echo "Second Statement."; > } > } > > else { > ?> > > <form action="<?php echo"$PHP_SELF"; ?>" > method="post"> > <p>Userid > <input type="text" name="userid"> > > <p>Password > <input type="password" name="password"> > > <p> > <input type="submit" name="submit" value="Submit"> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; > <input type="reset" name="reset" value="Reset"> > > </form> > <?php > } > ?> > > The global.inc.php contains the commands to connect to the database. I > get connected to the database but the above script still fails. Any > recommendations? > > Thanks for all your comments. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#25887) next »