Hallo,

Het volgende wilt niet werken.
HEt zal wel rap duidelijk zin wat de bedoeling is ....

<html>
<head>
<title>Untitled Document</title>

</head>

<body>
<?
function confirm_form($first_name, $last_name, $mail, $zip_code, $os){
print("Thanks\n");
print("Contact Info\n");
print("$first_name, $last_name \n");
print("$mail \n");
print("zip: $zip\n");
print("os: $os \n");
}

function print_form($first_name, $last_name, $mail, $zip_code, $os){?>
<table width="34%" border="2" cellspacing="0" cellpadding="0">
<form method="post">
<tr>
<td width="38%">First Name</td>
<td width="62%"><input name="first_name" type="text" value="<? print ("$first_name") ?>"></td>
</tr>
<tr>
<td>Last name*</td>
<td><input name="last_name" type="text" value="<? print $last_name ?>"></td>
</tr>
<tr>
<td>e-mail address*</td>
<td><input name="mail" type="text" value="<? print $mail ?>"></td>
</tr>
<tr>
<td>Zip-code*</td>
<td><input name="zip_code" type="text" value="<? print $zip_code ?>"></td>
</tr>
<tr>
<td>operating system</td>
<td><input name="os" type="text" value="<? print $os ?>"></td>
</tr>
</table>
<input type="submit" value="submit!">
<input type="reset" vamue="reset">
<? }

function check_form($last_name, $mail, $zip_code){
if(!$last_name && !$mail&& !$zip_code){ //waarom niet !isset($_POST["mail"]
confirm_form($first_name, $last_name, $mail, $zip_code, $os);
}
elseif(!isset($_POST["last_name"])){
print("You are missing some required fields \n");
print("you need to fill your Last name\n");
}
elseif(!isset($_POST["mail"])){
print("You are missing some required fields \n");
print("you need to fill your e-mail\n");
}
elseif(!isset($_POST["zip_code"])){
print("You are missing some required fields \n");
print("you need to fill your zip code\n");
}
print_form($last_name, $mail, $zip_code);

if(empty($_POST)){
?>Please enter your information <br>
met * verplicht in te vullen \n")<br>
<? print_form("","","","","");
} ?>
</body>
</html>
Hello, hieronder 2 korte scripts, die prima werken in php Versie 4.3.8, Maar in versie 4.3.11 worden de ingetypte tekten in het formulier niet meeverzonden.
Ziet of snapt iemand hoe dat kan?

(mail.php)
<html>
<head><title>Mail</title></head>
<body>

<?php
$mail = "Naam: " . $naam . "\r\nOnderwerp: " . $onderwerp . "\r\nBericht: " . $bericht . "\n";
mail("[email protected]", $onderwerp, $mail) or die("Fout bij het versturen van de mail");
?>
De mail is verstuurd. Bedankt voor uw reactie!
</body>
</html>


(form.php)
<html><head><title>Form</title>
<body>
<form action="mail.php" method="post" name="mailform">
Naam: <input type="text" name="naam" size="25"><br />
Onderwerp: <input type="text" name="onderwerp" size="25"><br />
Bericht: <textarea name="bericht" cols="50" rows="5"></textarea><br />
<input type="submit" name="submit" value="Verzenden">
</form>
</body>
</html>
kan je niet beter even een eigen topic openen want kijk is naar de datum...

En owja, ik wil wel even helpen: ipv $bericht die je wil mailen doe je $_POST['bericht'] en zo moet je het bij allemaal doen
ja, heb ik al gedaan

Reageren