![]() |
Quote Database
how would you go about doing one? with + and - value increaser like on bash.org
#quote number + - del QUOTE HERE like that, and how to do a top 100, random without using mysql. |
Why can't you use MySQL or some other database? It'll make it soooooooooooo much easier.
|
my host does not have it.
|
which database does your host allow?
|
In that case, I suggest getting a host which does. If that's not an option, you can have a PHP file with an array of quotes, and use the rand() function to pick them randomly.
|
Put them all in a file, putting each quote on a new line...
[php] function getQuote($file) { $file = implode("", file($file)); $file = explode("\n", $file); $quoteNum = rand(0, count($file) -1); return array("number" = >$quoteNum + 1, "quote" => $file[$quoteNum]); } [/php] Example usage: [php] $newQuote = getQuote("yourQuotesFile.txt"); echo "Quote #{$newQuote['number']}:<br>\n"; echo "<ul>"; echo $newQuote["quote"]; echo "</ul>"; [/php] |
my host sucks, no mysql, and I don't really feel like changing.
waht I really need to know is how to do a top 100 and make the + and - and x work. |
You probably need to get a new host, might I suggest http://www.crd-hosting.com - they have mySQL and PHP support and plenty of other goodies at very affordable prices ;)
|
Quote:
My President sucks, no intelligence, and I don't really feel like changing. :P |
Oooh... you're gonna get beats for that one... :p
|
| All times are GMT -5. The time now is 7:42 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC