summary refs log tree commit diff stats
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rwxr-xr-xpages/comic.php3
-rw-r--r--pages/random.php9
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
84if ($id < $all) 87if ($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
7header('Location: http://pillowcase.fourisland.com/comic' . $getcomic3['comic_id'] . '.htm');
8
9?>