Random Sentence

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
creyentededios
Forum Newbie
Posts: 3
Joined: Mon Oct 29, 2007 4:44 pm

Random Sentence

Post by creyentededios »

So heres my story

i have a flash file, and in it i have a text box

what i would like it to do is every time someone opens the flash file a random "law" is put in a text file
and then i have a button that when clicked would change the law to another law

is there a php code i could use?
i have 120 different "laws" that i would like it to choose from random one of them

also, there are some laws i would like to skip, so numbers i would like to skip, how can i do that?

thanks for your help!
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Post by Stryks »

I have no experience at all with the flash part of things, but it seems that all you want is a script to pull a random line of text and put it in a txt file.

Should be easy enough.

How are the laws stored? Text file? Database? If you want to ignore specific numbers, how are you planning to tie the law to the number ... or are they already numbered somehow? If so, what is the format?

If in a text file, give an idea of the format. Actually .. same if it's database based - table structure etc.

Cheers
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Post by GeXus »

That would all be done in flash.
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Post by Stryks »

Well then ... I cant help ... :lol:
creyentededios
Forum Newbie
Posts: 3
Joined: Mon Oct 29, 2007 4:44 pm

Post by creyentededios »

well i have a php file, im actually gettin help already

thanx though

i need help with this other thing:

viewtopic.php?p=426118#426118

if you dont mind takin a look
Post Reply