Djurovski Dejan wrote:

> What's wron in my script?
> I receive message:
> *Warning*: Supplied argument is not a valid MySQL result resource in 
> *c:\inetpub\wwwroot\login.php* on line *12*
> I input validate username ˛password!
> <?php
> include("config.php");
> if(!empty($username))
> {
> print("$username, $password");
> $aDBLink=@mysql_connect("$host", "$user", "$password");

Your problem might be that you use $user here, where everywhere else you 
seem to think it is called $username.

> mysql_select_db("$db", $aDBLink);
> $aSQL="select * from administracija where 
> administracija_username=$username";
> $aQResult=mysql_query($aSQL, $aDBLink);

You can also make a call to mysql_error() here, because MySQL is 
probably ready to tell you why your query did not execute correctly.

> $broj= mysql_num_rows($aQResult);
> P.S. I tried to send this message to General mailing list, but i could 
> not. I am subscribed!

You should really try to figure out why you can't post to php-general. I 
receive nearly 1000 messages a day and cannot be relied upon to reply to 
every one. Also, others may benefit from your question and the fact that 
it is archived on the list, and it is always better to get a few 
different perspectives on a particular problem.

Happy hacking.


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to