syntax basics

From: Date: Sun, 29 Oct 2000 11:58:03 +0000
Subject: syntax basics
Groups: php.db 
Request: Send a blank email to php-db+get-4021@lists.php.net to get a copy of this message
Hello friendly helpers, I started only a few weeks ago with PHP and MySQL. I had some prior experience with javascript, so the syntax is a bit familiar. My problem is that every time I call "mysql_fetch_array" I get the error message: "Supplied argument is not a valid MySQL result resource in c:\inetpub\wwwroot\blackboard\login.php on line 37" The only thing I know for sure is that "fetch_array" works when using it in a while-loop. Is it that ?! I'm trying to built a administrative screen to insert information like room-changes and stuff like that into a database for my university (better law-faculty). I use "fetch_array" to confirm the user-login-information, thus: function verify_login($username, $password) { $qid = mysql_query(" SELECT username, lehrstuhl FROM users WHERE username = '$username' AND password = '" . md5($password) . "' "); return = mysql_fetch_array($qid); (the script is taken from an online-shop tutorial at www.devshed.com by Ying Zhang)

« previous php.db (#4021) next »