Is there a way to do an if statement like this:
if ($password == mysql_query("SELECT password from member WHERE id = $id")) {
// f00
}
So what I mean is, if it is possible and/or good practice to have a short query in your if, instead of extracting it from your DB first.
Thanks!
WHERE id = $id"toWHERE id = '$id'"*(note the single quotes around$id, otherwisemysql_real_escape_string()will not protect you.mysql_queryfunction?