pyke96 Posted February 19, 2008 Share Posted February 19, 2008 I am trying to edit a user in a database. I am getting this message, Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\webs\test\Website\EDIT_DOCTOR.php on line 32 This is the line of code, $query = "SELECT doctor_id, doctor_first_name, doctor_last_name, doctor_address, doctor_county, doctor_country FROM doctors WHERE doctor_id = '$_POST[id]'"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) Link to comment https://forums.phpfreaks.com/topic/91937-php-and-mysql/ Share on other sites More sharing options...
craygo Posted February 19, 2008 Share Posted February 19, 2008 try putting some error checking and let us know $result = mysql_query($query) or die(mysql_error()); you should also try this $query = "SELECT doctor_id, doctor_first_name, doctor_last_name, doctor_address, doctor_county, doctor_country FROM doctors WHERE doctor_id = '".$_POST['id']."'"; Ray Link to comment https://forums.phpfreaks.com/topic/91937-php-and-mysql/#findComment-470789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.