summaryrefslogtreecommitdiff
path: root/bPod/php/buckyth.php
diff options
context:
space:
mode:
Diffstat (limited to 'bPod/php/buckyth.php')
-rw-r--r--bPod/php/buckyth.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/bPod/php/buckyth.php b/bPod/php/buckyth.php
new file mode 100644
index 0000000..617e354
--- /dev/null
+++ b/bPod/php/buckyth.php
@@ -0,0 +1,34 @@
+ <?php
+
+
+ // TOUCH NOT LEST YE BE TOUCHED _______________________________
+
+ mysql_connect ("localhost","tfarnon","blunderbus"); // lol security
+ mysql_select_db ("bucky");
+
+ $keyword = $_GET['k'];
+
+ $q = "SELECT * FROM threads where keyword = '" . $keyword . "' order by title desc";
+
+// echo $q;
+
+ $query = mysql_query ( $q );
+
+ $nrows = mysql_num_rows ($query);
+
+
+
+ // SET UP STRING BELOW HERE ___________________________________
+
+// echo "$nrows = " . $nrows;
+
+ $rString = "&numItems=" . $nrows;
+
+ for ($i = $nrows-1 ; $i > -1; $i--) {
+ $row = mysql_fetch_array($query);
+ $rString .= "&title" .$i ."=". $row['title'];
+ $rString .= "&user" .$i ."=". $row['username'];
+ $rString .= "&id" .$i ."=". $row['id'];
+ }
+ echo $rString;
+?> \ No newline at end of file