diff options
Diffstat (limited to 'pages/random.php')
| -rw-r--r-- | pages/random.php | 9 |
1 files changed, 9 insertions, 0 deletions
| diff --git a/pages/random.php b/pages/random.php new file mode 100644 index 0000000..15d7758 --- /dev/null +++ b/pages/random.php | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | $getcomic = "SELECT * FROM comics WHERE status = \"publish\" ORDER BY RAND() LIMIT 1"; | ||
| 4 | $getcomic2 = mysql_query($getcomic); | ||
| 5 | $getcomic3 = mysql_fetch_array($getcomic2); | ||
| 6 | |||
| 7 | header('Location: http://pillowcase.fourisland.com/comic' . $getcomic3['comic_id'] . '.htm'); | ||
| 8 | |||
| 9 | ?> | ||
