When you adopt a pet, the URL is wrong. idp is always zero in the URLs that you are showing. Did the INSERT statement fail in adopt.php maybe?
You can see the error message generated if you comment out the "header('Content-Type: ..." line in simple.php and go to the image URL directly in your browser instead:
PHP Error Message
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/a3459659/public_html/simple.php on line 20
Free Web Hosting
PHP Error Message
Warning: Invalid argument supplied for foreach() in /home/a3459659/public_html/adopttools.php on line 52
Free Web Hosting
PHP Error Message
Warning: Invalid argument supplied for foreach() in /home/a3459659/public_html/simple.php on line 33
Free Web Hosting
PHP Error Message
Warning: readfile() [function.readfile]: Filename cannot be empty in /home/a3459659/public_html/simple.php on line 42
Free Web Hosting
The first error indicates that the query failed. To find out why, add error checking too. Change simple.php's:
- Code: Select all
$result2 = mysql_query($sql2);
Into:
- Code: Select all
$result2 = mysql_query($sql2) or die(mysql_error());
And it will be able to print a useful error message for you.