I don't know what I'm talking about. Please tell me what I need to know. ^_^" I would like to create an online test that sends the results to a certain email address, but I'm not sure how to begin. I think it's possible to make textboxes and stuff with both Java and applets, or JavaScript, right? Which should I try working on?
I also want the test to change each time it's ran, most likely based on a .txt or something that tells how to change the questions and answers. I'm not really sure how to make that work yet, either... I guess, using functions to say how to change things based on variables I use in a different file. Can javascript even read stuff from other places? So maybe it needs to be the applet thingy?
Here's a quick example using HTML + PHP (forgoing javascript for simplicity)
HTML Page (index.html):
<html>
<head>
<title>My Cool Form</title>
</head>
<body>
<!-- Set the action to the page that will handle the form data -->
<form action = "thanks.php" method="post">
<!-- The name attribute will be used by thanks.php later -->
E-Mail: <input name="email" type="text"></input>
<input type="submit" value="Submit"></input>
</form>
</html>
thanks.php:
<?php
$to = "me@example.com"
$from = "From: form-results@example.com";
$subject = "Got a result from the form!";
// Get the e-mail from the form
$email = $_POST['email'];
$body = "The persons e-mail is" . $email;
// Send an e-mail to me@example.com
mail($to, $subject, $body, $from);
?>
<html>
<head>
<title>Thank you :)</title>
</head>
<body>
Thanks for your submition. We have added
<?php
echo $email;
?>
to our mailing list!.
</body></html>
HTML is a markup language used to define your document and forms. This is used by your browser to create the webpage seen by your user.
PHP is a server-sided language which runs on your server, not the users, that accesses data such as information from forms, databases, rss feeds, etc and then processes the data (for example mailing the form results to you) before sending the user a HTML document (like one that says thank you for you submition, latest blog posts from a database, etc).
Find a nice free host and upload these files to see them in action.