View Full Version : Quote randomiser - generator
10-30-2010, 12:10 AM
Hopefully someone can help, thanks in advance!
10-30-2010, 12:16 AM
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-30-2010, 12:23 AM
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-30-2010, 12:28 AM
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-30-2010, 12:33 AM
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-30-2010, 12:39 AM
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-30-2010, 12:43 AM
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 © 2016 vBulletin Solutions, Inc. All rights reserved.