jenbobblehead Posted November 8, 2006 Share Posted November 8, 2006 can someone point me to a script that would randomly (but only once for each) select and display a name (from a pre-arranged list of names in a file somewhere) on a website? so a person would click on a button and a name would come up, but once it came up once, it wouldn't come up again (so we don't have duplicates) who can help me? Quote Link to post Share on other sites
bjorn_skurj Posted November 8, 2006 Share Posted November 8, 2006 I downloaded something like that once that purported to be a random name generator for writers of fiction and such. Quote Link to post Share on other sites
WilcoFan Posted November 8, 2006 Share Posted November 8, 2006 If the algorithm is truly random, the only way to guarantee that the name does not appear twice is to remove the name from a list of available names once it has appeared. -- this would have to be done per session! I'll look around but sounds like finding a needle in a haystack. Quote Link to post Share on other sites
c53x12 Posted November 8, 2006 Share Posted November 8, 2006 What technologies are available to you? Does it need to be CGI, php, or Javascript? I could probably write something if you can use Perl or Javascript. Quote Link to post Share on other sites
cryptique Posted November 8, 2006 Share Posted November 8, 2006 If this is for a web-enabled Secret Santa thing, how about doing it this way: Each new person to show up and register is automatically assigned the previous registrant as their gift recipient. The first registrant would be the one who initiates the list (Jen?), and she would simply be assigned the last person to register before the list was closed. It would maintain a certain kind of randomness because the registration order wouldn't be known to anyone registering. Not a perfect system, but probably workable. I don't do scripting, but I'm guessing that would be a lot easier to put together. Quote Link to post Share on other sites
jenbobblehead Posted November 8, 2006 Author Share Posted November 8, 2006 whomever can make this work for me before December 1 will get cookies. And it is for secret santa! I have a website but i don't use any scripts on it just because i don't know how.... i did find this thought.... Online Secret Santa but i don't want to subject anyone to any more spam than they are willing and i worry these sorts of things are email grabbers. Thoughts? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.