note 52975 added to function.mysql-fetch-object

From: Date: Thu, 19 May 2005 10:37:38 +0000
Subject: note 52975 added to function.mysql-fetch-object
Groups: php.notes 
Request: Send a blank email to php-notes+get-89634@lists.php.net to get a copy of this message
<?php mysql_connect('localhost','root','') or die('Impossible de se conneter au serveur de base de sonnées'); mysql_select_db('publication') or die('Impossible de se connecter à la base de données publication'); $login = $_POST['userlogin']; $pass = $_POST['userpass']; $requete = mysql_query("select pass from auteur where auteur.login=$login"); while($ligne = mysql_fetch_object($requete)) { if( $ligne->pass == md5($pass)) { header('location: Redaction.php'); } } ?> This script doesn't work and the error message is Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp1-7\www\publication\connexion.php on line 17 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-object.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52975 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52975&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52975&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52975&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52975&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52975&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52975&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89634) next »