Hello community, i have been browsing it for a while before deciding to post here. It looks like there are a lot of people find help here and that's great, I'm really glad to find a place where more experienced users help those that are new to PHP. I just hope you can help me too 🙂
I have been trying for a couple of days now to implement several drop down menus in a html application form for my website and everything is working great except for the fact that my mailer.php does not capture the value of the selected item in each drop down menu to include them in the email I'm supposed to receive when you press 'Submit'.
Here's two of the drop down menus for you to see how i implemented them:
<select name="Graphics card" class="style3" id="graph">
<option selected="selected"></option>
<option value="ATI Radeon 9000 Series">ATI Radeon 9000 Series</option>
<option value="ATI Radeon X Series">ATI Radeon X Series</option>
<option value="ATI Radeon HD2000 Series">ATI Radeon HD2000 Series</option>
<option value="ATI Radeon HD3000 Series">ATI Radeon HD3000 Series</option>
<option value="ATI Radeon HD4000 Series">ATI Radeon HD4000 Series</option>
<option value="ATI Radeon HD5000 Series">ATI Radeon HD5000 Series</option>
<option value="NVIDIA GeForce 4,5,6 Series">NVIDIA GeForce 4,5,6 Series</option>
<option value="NVIDIA GeForce 7,8,9 Series">NVIDIA GeForce 7,8,9 Series</option>
<option value="NVIDIA GeForce 100 Series">NVIDIA GeForce 100 Series</option>
<option value="NVIDIA GeForce 200 Series">NVIDIA GeForce 200 Series</option>
</select>
and
<select name="OS" class="style3" id="os">
<option selected="selected"></option>
<option value="Windows XP">Windows XP</option>
<option value="Windows Vista">Windows Vista</option>
<option value="Windows 7">Windows 7</option>
<option value="Linux">Linux</option>
<option value="Mac OS X">Mac OS X</option>
<option value="Other">Other</option>
</select>
Now my mailer.php looks like this (i will leave the mail address blank due to obvious reasons):
<html>
<head>
<title>Application form Mailer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
$email = $_POST["email"];
$name = $_POST["name"];
$class = $_POST["class"];
$played80 = $_POST["played80"];
$armory = $_POST["armory"];
$spec = $_POST["spec"];
$consumable = $_POST["consumable"];
$archavon = $_POST["archavon"];
$emalon = $_POST["emalon"];
$kora = $_POST["kora"];
$coa = $_POST["coa"];
$naxx = $_POST["naxx"];
$eoe = $_POST["eoe"];
$fl = $_POST["fl"];
$ignis = $_POST["ignis"];
$rzr = $_POST["rzr"];
$xt = $_POST["xt"];
$tic = $_POST["tic"];
$kol = $_POST["kol"];
$aur = $_POST["aur"];
$hod = $_POST["hod"];
$fr = $_POST["fr"];
$th = $_POST["th"];
$mi = $_POST["mi"];
$gv = $_POST["gv"];
$ys = $_POST["ys"];
$alg = $_POST["alg"];
$beasts = $_POST["beasts"];
$jara = $_POST["jara"];
$champ = $_POST["champ"];
$ttv = $_POST["ttv"];
$anub = $_POST["anub"];
$age = $_POST["age"];
$gender = $_POST["gender"];
$prevg = $_POST["prevg"];
$leaving = $_POST["leaving"];
$time = $_POST["time"];
$bring = $_POST["bring"];
$joining = $_POST["joining"];
$vent = $_POST["vent"];
$raids = $_POST["raids"];
$commit = $_POST["commit"];
$free = $_POST["free"];
$filledout = $_POST["filledout"];
$cpu = $_POST["cpu"];
$speed = $_POST["speed"];
$memory = $_POST["memory"];
$graph = $_POST["graph"];
$os = $_POST["os"];
$connection = $_POST["connection"];
if (eregi("(\r|\n)", $email)) {
die(":(");
}
if (eregi("(\r|\n)", $name)) {
die(":(");
}
$recipient=("x@x.xxx");
$recipient2=($email);
$subject=($class. " application to xxx, name: " .$name);
$content=
"
CHARACTER
Character name: ".$name."
Class: ".$class."
Time /played at level 80: ".$played80."
Armory URL: ".$armory."
Spec and reason: ".$spec."
Raid consumables: ".$consumable."
=========================================================
RAIDING EXPERIENCE
Vault of Archavon: ".$archavon." - ".$emalon." - ".$kora."
Chamber of Aspects: ".$coa."
Naxxramas: ".$naxx."
Eye of Eternity: ".$eoe."
Ulduar: ".$fl." - ".$ignis." - ".$rzr." - ".$xt." - ".$tic." - ".$kol." - ".$aur." - ".$hod." - ".$fr." - ".$th." - ".$mi." - ".$gv." - ".$ys." - ".$alg."
Argent Coliseum: ".$beasts." - ".$jara." - ".$champ." - ".$ttv." - ".$anub."
=========================================================
ABOUT YOU
Age: ".$age."
Gender: ".$gender."
Previous Guilds: ".$prevg."
Reason for leaving: ".$leaving."
Playing times: ".$time."
What can you bring to Eminence: ".$bring."
What do you expect from Eminence: ".$joining."
Do you have and are able to speak English using a mic over vent: ".$vent."
Can you make our 4 raid days: ".$raids."
Do you have any commitments that could you prevent you from raiding?: ".$commit."
Do you have anything to add: ".$free."
Computer specs: CPU: ".$cpu." ".$speed." Memory: ".$memory." Graphics card: ".$graph." Operating system: ".$os."
Internet Connection: ".$connection."
Is your application filled out completly and did you think through your answers?: ".$filledout.
$message;
$message=("Thank you for filling out an application on www.xxxxx.xxx It will be taken into consideration. For more information please feel free to contact one of our officers in game.
Greetings, The xxxx.
We received the following application:
".$content);
mail($recipient, $subject, $content);
mail($recipient2, $subject, $message);
echo "Your application has been succesfully sent. Thank you!";
//echo "<pre>$content</pre>";
//die();
?>
<meta http-equiv="refresh" content="1; URL=appdone.html">
</body>
</html>
Now as you can see i have several drop down menus like: cpu, speed, memory, graph and os.
My questions exactly is: What do i have to add and where so that the option in the drop down menu from the html application form gets remembered and captured by the mailer.php and sent to the email address?
Thank you very much!
//porku