Reply to Re: PHP connection problem, I can't get success with loging in though I think I use corect login and password...

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация