RE: [PHP] Authenticating User ID/Pass in Database problem
| From: | Paul Williams | Date: | Mon, 27 Nov 2000 14:58:25 +0000 |
| Subject: | RE: [PHP] Authenticating User ID/Pass in Database problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27380@lists.php.net to get a copy of this message | ||
Jason said:
> > $query = "select userid, password, company, from
> registration where
> > userid='$userid' and password='$password'";
>
> you're using single quotes around $userid and $password,
> which prevents
> the variables from being replaced with the real values. try:
>
> $query = "select userid, password, company from registration where
> userid=\"$userid\" and password=\"$password\"";
I use single quotes all the time, in that situation. I've never had any
problems... Well... not with that anyway :-)
Cheers all
Paul