I was making an auto email application, where you would type in your name, email, question and the message. But it doesn’t work somehow… could anyone of you guys maybe see it? It would be very appreciated!
//Robin
[php]<?php
$to = ‘[email protected]’;
$subject = ‘Fråga på Organisation.se’;
$name = $_POST[‘name’];
$email = $_POST[‘email’];
$topic = $_POST[‘topic’];
$message = $_POST[‘message’];
$body = <<<EMAIL
Hej $name ! Tack för din fråga på Organisation.se!
Vi kommer att svara på ditt meddelande snarast möjligt.
Här är din fråga angående $topic :
$message
med vänliga hälsningar Organisation.se
Obs svara inte på detta mejlet!
Om det inte var du som skickade denna frågan, bara ignorera den.
Till: $email
Från: Organisation.se
EMAIL;
$header = “From: $email”;
if($_POST){
if($name == ‘’ || $email == ‘’ || $message == ‘’){
$feedback = ‘OBS Fyll i alla rutorna!’;
}else{
mail($to, $subject, $body, $header);
$feedback = ‘Tack för ditt mail!’;
}
}
?>
[/php]Some of the HTML here:
[code]
Kontakt:
<?php echo $feedback; ?>
-
*Namn:
-
*Email:
-
*ärende:
Jobb
verksamhet
Skydd
Framsteg
Annat
-
*Meddelande:
-
</div>
</div><!-- END MiddleHolder ###-->[/code]
the document does end with .php instead if .html
if anyone thinks thats the problem…