PDA

View Full Version : email var info if var < x (for a game)


Ricky158
11-23-2002, 10:39 PM
alright. i've got a JS game, and it's that kind of game where you have to match up two of the same picture. from memory. there's a timer going from the time you begin. so i want to have some kind of a "submit your score" thing, where their time is emailed to me, if it is under a certain time. so if they have to complete the game in under 1:30, and they do, they get prompted with a "Congratulations. Please enter your name in the field below to be posted in the Top 10" and there would be a little textarea under that. and the name they put, along with their score, would be emailed to me.

in the game, the timer's name is: "init()"


any help is appreciated. thanks.

glenngv
11-25-2002, 10:10 AM
you need a server-side language to automatically send user input to an email address. Using mailto: you can open the mail client and auto-fill recipient, subject and message body fields but still the user has to manually send the mail, that is of course if it is configured to send email). So server-side language is the way to go.

Ricky158
11-25-2002, 10:57 PM
could it be done with a form? the "Ok" button after they type their name could be used as the "Submit" button like in a form.... but i dont know if this could be done either.