|
|
Posted by shimmyshack on 04/27/07 20:45
On Apr 27, 7:13 pm, MIUSS <m...@seznam.cz> wrote:
> Hi!
>
> I'm little confused, I tried more things but I still didn't get
> success.
>
> I think this should be corect:
>
> $sql = mysql_query("SELECT * FROM autori
> WHERE login LIKE \"".
> $_SERVER['PHP_AUTH_USER']."\"
> AND pass LIKE
> \"".md5($_SERVER['PHP_AUTH_PW'])."\"
> AND stav LIKE a\";");
>
> But it isn't and it does not work:-(
dont use LIKE, instead use = and your query should be better formed,
go check out how to authenticate with mysql, and look for the query
used, and follow the example,
$query = sprintf( "SELECT...... WHERE `login` = '%s' ......",
$_SERVER['PHP_AUTH_USER'] [,......] );
etc.... google for this rather than just trying stuff, else you will
get it wrong.
[Back to original message]
|