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)) Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.