Okay, so I\'ve made one php file to output the images this is the sample code for the output page:
mysql_connect (\" \",\" \",\" \") or die(mysql_error()); mysql_select_
All I'm getting are a series of torn page icons on the output page.
In fact, you create kind of "denial of service" attack against your site, mking it run dozens PHP scripts and opening dozens sql connections per single page request. No wonder yor server being overloaded with such a flood and shows no pictures.
Also note that your code suffering from SQL injection.
Either change addslashes to intval()
or add quotes around $id in the query (otherwise escaping will make no sense)