Hi there Orangutang,
The only thing I will suggest as a logic improvement, is the evaluation of the username/password ie:
If (($username == $dbusername) && ($password == $dbpassword))
This is now easier to read and makes more logical sense imo. Again, just a suggestion ;)
And as Optik points out the last query hasn't got quotes around it, when evaluating vars into a sql query or evaluating static content, they
need to be quoted, so this would be favoured:-
$query = "SELECT * FROM `quotes` WHERE `clientid` = '".$_SESSION['logged']."' ";
But, either my version or Optik's would produce the same result. My concern is that you say the error is 'query empty', so I have to ask, have you echoed the populated var to screen to see if it is populated as expected
before you execute/send the query to the DB - always helps to debug the query before sending the data.
Also, I would definitely check the $_SESSION array to see if everything is set as axpected, but personally, I think that the missing single quote will be to blame, just as was pointed out by Optik.
Hope this helps,
Cheers,
MRb