View Full Version : Quote randomiser - generator
10-29-2010, 11:10 PM
Hopefully someone can help, thanks in advance!
10-29-2010, 11:16 PM
Its very possible with server side languages such as Coldfusion or PHP. You would need the quotes to be stored in a database and called by the use of queries once the user clicks the button.
Why not google it. I just did and think I saw a site using PHP to do this here (http://www.quotationspage.com/random.php3).
10-29-2010, 11:23 PM
I think I get that. Ive never used PHP either, so Im kinda confused but found a site that may help, unless you have suggestions?
[What I found: http://www.3till7.net/2005/06/08/random-quotes-with-php/ ]
So, from what Im reading, does it mean I basically have to make a text file of the quotes and such and then load that somewhere, and basically link back via the code? Im so confused and I apologise that I dont know all that much of anything so cant be much help. :(
Im just unsure as well as to what things will work on the journal.
10-29-2010, 11:28 PM
If I understand you right...you just want a bunch of different quote that are randomly displayed when I user clicks on a button.
No not a text file. A database would hold the quotes in a table. Then a query would call the random quote based on the user clicking a button. This could also be done simply on each page load or refresh.
Ok I googled and think now you dont HAVE to use a database. It would make managing the quotes much easier, but you could use an array and call them using php,
I found this site (http://www.davidmarotz.com/quotes.php)that gives the code for this.
10-29-2010, 11:33 PM
Yep, thats what I do want. I will look there, thank you! Im sure Ill find something and if I dont, I guess I dont. Its not a dier need or anything, but helps to learn new stuff like this anyway! :]
So just post the code in or? Sorry, Im extremely new and unsure what is what. :/
10-29-2010, 11:39 PM
well no not exactly. SInce its php script, you would need to save the html file with .php extension instead of .html extension. You would also need a php server to "serve" the php code
Is this a site you have hosted somewhere already? If so check to make sure they support PHP(most do).
10-29-2010, 11:43 PM
Ohhh! I think I understand, Im slow today, sorry again. Im trying to understand it all.
I dont host the journal, I just have a journal on the site. Its kinda like LiveJournal. I dont think I can as Im just a user, but wasnt sure if this type of thing was possible at all. :/
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.