diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2011-10-15 10:02:30 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2011-10-15 10:02:30 -0400 |
commit | a4cca42fa3afbe325ab403dae31aedb1c3cf4075 (patch) | |
tree | 08156c3583364c5141e137363da361288ad45884 /pages | |
parent | 2101d286d836a54cde9a4cd428e0ebbf9ce7929a (diff) | |
download | pillowcase-a4cca42fa3afbe325ab403dae31aedb1c3cf4075.tar.gz pillowcase-a4cca42fa3afbe325ab403dae31aedb1c3cf4075.tar.bz2 pillowcase-a4cca42fa3afbe325ab403dae31aedb1c3cf4075.zip |
Added random comic link
Diffstat (limited to 'pages')
-rwxr-xr-x | pages/comic.php | 3 | ||||
-rw-r--r-- | pages/random.php | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/pages/comic.php b/pages/comic.php index 0479e17..95df3dc 100755 --- a/pages/comic.php +++ b/pages/comic.php | |||
@@ -81,6 +81,9 @@ if ($id > 1) | |||
81 | <?php | 81 | <?php |
82 | } | 82 | } |
83 | 83 | ||
84 | ?> <LI><A HREF="/random.htm">Random</A></LI> | ||
85 | <?php | ||
86 | |||
84 | if ($id < $all) | 87 | if ($id < $all) |
85 | { | 88 | { |
86 | if ($id != ($all-1)) | 89 | if ($id != ($all-1)) |
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 | ?> | ||