Re: Typical login script... user problem... :)
| From: | Jason Wong | Date: | Wed, 11 Dec 2002 07:33:58 +0000 |
| Subject: | Re: Typical login script... user problem... :) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24052@lists.php.net to get a copy of this message | ||
On Wednesday 11 December 2002 13:10, Hartleigh Burton wrote:
>
> <? if ($submit) {
> $db = mysql_connect("localhost", "dbname", "dbpassword");
> mysql_select_db("mydb", $db);
>
> $db_user = "
> SELECT ID FROM dbusers
> WHERE UserName = '$username'";
>
> $db_pass = "
> SELECT Password FROM dbpasswords
> WHERE ID = '$db_user'";
>
> $db_pass_temp = MD5('$db_pass');
>
> if ($password == $db_pass_temp) {
You haven't grasped the concept of to access data from a db. Please refer the
to examples in the manual to see how it should be done.
Hint: echo "$db_user, $db_pass" to see whether they contain what you think
they contain.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Persistence in one opinion has never been considered a merit in political
leaders.
-- Marcus Tullius Cicero, "Ad familiares", 1st century BC
*/