A few months ago I wrote a small gallery in PHP. An image would be uploaded and certain values provided by the user (name, height, width etc.) would be written to a MySQL db. I also wrote something to remove such entries (including image).
Here's the problem: it doesn't work and I can't remember why. I get this error:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/heijden/domains/liverezh.nl/public_html/prive/editimginfo_action.php on line 28
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/heijden/domains/liverezh.nl/public_html/prive/editimginfo_action.php on line 29
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/heijden/domains/liverezh.nl/public_html/prive/editimginfo_action.php on line 30
Line 28, 29 and 30 are:
$title=mysql_result($result, 0, "title");
$image_fs_path = mysql_result($result, 0, "fsimage_path");
$image_tb_path = mysql_result($result, 0, "tbimage_path");
Which are preceded by:
$query_output = "SELECT title, width, height, medium, sold, fsimage_path, tbimage_path FROM $DBtable WHERE id=$id";
$result = mysql_query($query_output);
Could anyone please help me? :(
>PHP
there's your problem!
Sorry nevermind, $DBtable was the wrong variable.
This thread was just born, and it has already been abandoned to die of starvation and exposure in the wild!
Remember, kids, threads are not just for christmas.