<?php//setting up the variables$name = $_POST['name'];$email = $_POST['email'];$age = $_POST['age'];$vote = $_POST['vote'];$computer[1] = $_POST['computer[1]'];
$computer[2] = $_POST['computer[2]'];
$computer[3] = $_POST['computer[3]'];$computer[4] = $_POST['computer[4]'];$comments = $_POST['comments'];//this is what will be displayed when the submit button is pressedecho "<html><head><title>Form Response</title></head>";echo "<body bgcolor=\"white\">"; echo "<h1 align=\"center\">";echo "Thanks for your response!";echo "</h1>";echo "<p>Here's what you wrote:</p>";echo "<pre>";echo $name . " submitted the following:\n";echo "Name: " . $name . "\n";echo "Email:" . $email . "\n";
echo "Age:" . $age . "\n";echo "How voted:" . $vote . "\n";echo "Computer Used regularly:";echo $computer[1] . " ";echo $computer[2] . " ";echo $computer[3] . " ";echo $computer[4] . "\n";echo "Comments:" . $comments . "\n" ;echo "</pre>";echo "</body></html>";//this sends email to INSERTYOUREMAILADDRESS with the information$to = "INSERTYOUREMAILADDRESS";$subject = "Comments from $name <$email>";$message = "Here's what $name wrote:

Name: $name
Email: $email
Age: $age
How voted: $vote
Computer used regularly: $computer[1] $computer[2] $computer[3] $computer[4]
Comments:
$comments

========================";$from = "From: $name <$email>";mail($to,$subject,$message,$from);//this will store the information to a text-only database (formdata.txt)$fp = fopen("formdata.txt", "a");fwrite($fp, $message);fclose($fp);?>