Mail med PHP
Jeg har et lille simpelt php script der bare skal sende alle felterne i en formular. Problemet er at det virker helt tilfældigt om den gider at se det eller ej.Script:
<?php
$body = "<table><tr><td><strong>Felt</strong></td><td><strong>Indhold</strong></td></tr>";
foreach ($_POST as $field => $input) {
$body .= "<tr><td>".ucfirst($field)."</td><td>".trim(strip_tags($input))."</td></tr>";
}
$bodt .= "</table>";
if(mail("jacob@captive.dk", "Formular", $body, "From: ".$_POST['EMail']."\r\nContent-Type: text/html\r\n")) {
echo "Ja";
} else {
echo "Nej";
}
?>
Placering: http://www.offshoreconsult.dk/beta/core.php?id=ansoegbankkonto
Hvad gør jeg galt?
