Jump to content

php and mysql


pyke96

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.