How to randomly retrieve images from my mysql database?

前端 未结 3 957
星月不相逢
星月不相逢 2021-01-25 21:42

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_

3条回答
  •  囚心锁ツ
    2021-01-25 22:08

    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)

提交回复
热议问题