Leeftijd:
Geslacht:
Beroep:
...
Alles wat ik had ingevuld stond niet in de mail... Kan er iemand mij hier mee helpen?
Hier is een stukje html-code:
<html>
<html>
<body>
<form name="enquête voeding" action="process.php" method="post" enctype="text/plain">
<h6 class="style6">Gegevens: </h6>
<h6 class="style4"> Leeftijd</h6>
<h6 class="style4">
<input name="leeftijd" type="text" id="Leeftijd">
</h6>
<h6 class="style4"> </h6>
<h6 class="style4">Geslacht</h6>
<h6 class="style4">
<input name="geslacht" type="radio" value="Man">
Man </h6>
<h6 class="style5"> <span class="style1">
<input name="geslacht" type="radio" value="Vrouw">
Vrouw</span></h6>
<h6 class="style4"> </h6>
<h6 class="style4">Beroep</h6>
<h6 class="style4">
<input name="beroep" type="text" id="Beroep">
</h6>
<h6 class="style4"><strong> </strong></h6>
<h6 class="style4">
<input type="submit" name="Submit" value="Verzend de enquête">
<input type="reset" name="Reset" value="Wissen">
</h6>
</form>
<h6 align="left" class="style1"> </h6>
<p class="style1"> </p>
<h6 class="style1"> </h6>
<p class="style1"> </p>
</body>
</html>
</HTML>
<html>En hier een stukje PHP:
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$leeftijd = $_POST['leeftijd'];
$geslacht = $_POST['geslacht'];
$beroep = $_POST['beroep'];
$recipient = "[email protected]";
$subject = "enquête voeding";
$mail_body ="De enquête is op " . date("d-m-Y") . " om " . date("H:i") . "uur verzonden.\n";
$mail_body.="Het bevat de volgende inhoud:\n\n";
$mail_body.="Leeftijd: " . $leeftijd . "\n";
$mail_body.="Geslacht: " . $geslacht . "\n";
$mail_body.="Beroep: " . $beroep . "\n\n";
$check = mail($recipient,$subject,$mail_body);
if($check) echo"de enquête is correct verzonden!" . "\n\n" . "Hartelijk bedankt," . "\n\n" . "Klara";
?>