Msg#: 4864 posted 12:28 am on Jan 15, 2006 (gmt 0)
New poster here *waves*
Ok, well, I am creating an iq test website and need some help on how to get the alert message with the score to come up, with it emailing the score to me.
Here's some of the source code for the quiz: In the header...
and in the body, here is what the question setup looks like... <form method="get" onsubmit="tester()"> 1. Which number doesn't belong? <p><input type="radio" name="R1" value="V1">714 </p> <p><input type="radio" name="R1" value="V2">892 </p> <p><input type="radio" name="R1" value="V3">993 </p> <p><input type="radio" name="R1" value="V4">698 </p> <div align="center"><center><p><input type="submit" value="Get Score"></p> </center></div>
Currently, this only comes up with an alert box which says the score...but is there any way to make it still do that, and also email the score to me, all by pressing the submit?
To be more specific, your <FORM> line would look something like this:
<form method=yest action=myscript.cgi>
The file "myscript.cgi" is a Perl or PHP program you wrote and uploaded to the server. That program displays the results to the user and then emails you the results. Perl and PHP are not hard to learn and it's worth learning one of them, especially if you want to do things like send emails or store info in a database.
One downside of that is that your email address is naked on the page, and spambots will pick it up and add it to their lists.
Also, the script just calls up a new email message, it doesn't actually send. You're relying on the user to actually click Send, and maybe they won't.
If you link your <FORM> to a PHP or Perl script then you can avoid all three downsides.