Hello,
I have two scripts which don’t work.
One of them is a script with radio buttons: inkoop.php
[code]
<?php if( $_SERVER['REQUEST_METHOD'] == "POST" ) { // iig even checken of er gepost is $naam = htmlspecialchars($_POST["naam"]); $telefoon = htmlspecialchars($_POST["telefoon"]); $email = htmlspecialchars($_POST["email"]); $tekst = htmlspecialchars($_POST["tekst"]); if (!$naam) { echo "U heeft geen naam ingevuld!"; exit; } if (!$telefoon) { echo "U heeft geen telefoonnummer ingevuld!"; exit; } if (!$email) { echo "U heeft geen e-mailadres ingevuld!"; exit; } if (!$tekst) { echo "U heeft geen tekst ingevuld!"; exit; } echo($_POST["Radio1"]); $tijd = time(); $datum = strftime("%d/%m/%y %H:%M", $tijd); $ip = getenv("REMOTE_ADDR"); $message = "" . $naam . " met het e-mailadres " . $email . " en het IP $ip stuurde op $datum het volgende bericht: ____________________________________ " . $bericht . " ------------------------------------"; $ to = '[email protected]'; $ subject = 'onderwerp'; $ message = 'het te versturen bericht'; $ headers = 'From: [email protected]' . "rn" . 'X-Mailer: PHP/' . phpversion(); mail( $ to, $ subject, $ message, $ headers); //$mailadres = "[email protected]"; //$message = str_replace ("","n", $message); //mail("$mailadres", "Bericht van mijndomein.nl", //$message, "From: " . $email . "");*/ echo "Uw bericht is verzonden. U krijgt zo snel mogelijk antwoord."; exit; } else { // niks gepost, dus formulier weergeven ?>[/code]
The other one is some sort of contact form: website.php
[code]<?php
if( $_SERVER[‘REQUEST_METHOD’] == “POST” ) { // iig even checken of er gepost is
$naam = htmlspecialchars($_POST[“naam”]);
$website = htmlspecialchars($_POST[“website”]);
$beschrijving = htmlspecialchars($_POST[“email”]);
$bericht = htmlspecialchars($_POST[“bericht”]);
if (!$naam) {
echo “U heeft geen naam ingevuld!”;
exit; }
if (!$website) {
echo “U heeft geen website ingevuld!”;
exit; }
if (!$beschrijving) {
echo “U heeft geen beschrijving voor de website ingevuld!”;
exit; }
if (!$bericht) {
echo “U heeft geen bericht ingevuld!”;
exit; }
else {
$tijd = time();
$datum = strftime("%d/%m/%y %H:%M", $tijd);
$ip = getenv(“REMOTE_ADDR”);
$message = “” . $naam . " met het e-mailadres " . $email . " en het IP $ip stuurde op $datum het volgende bericht:
" . $bericht . "
------------------------------------";
$mailadres = “[email protected]”;
$message = str_replace ("
",“n”, $message);
mail("$mailadres", “Bericht van mijndomein.nl”,
$message, "From: " . $email . “”);
echo “Uw bericht is verzonden. U krijgt zo snel mogelijk antwoord.”;
}
?>[/code]
Both files are located at http://www.jermit.nl
http://www.jermit.nl/inkoop.php and http://www.jermit.nl/website.php
Can anyone help me please?