nightscream
New Member
- Messages
- 948
- Reaction score
- 0
- Points
- 0
I have a problem with my php script, it should send a mail when someone clicks the submit button, i've added the name="sumbit" to the submit button but it won't send an email, I think it has to do with the isset command.
here is my code:
here is my code:
PHP:
<?
if(isset($_POST['submit'])) {
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$message = "Naam: ".$_POST['naam']." ".$_POST['voornaam']."<br />";
$message .= "Email: ".$_POST['e-mail']."<br />";
$message .= "Telefoon: ".$_POST['telefoon']."<br />";
$message .= "Adres: ".$_POST['adres']."<br /><br />";
$message .= "Bericht:<br />".$_POST['bericht'];
if(mail("pipo1568@hotmail.com","Uitstappen", $message, $headers)) {
?>
<script language="javascript">
alert("Het bericht is met succes verzonden.")
</script>
<?
}else {
?>
<script language="javascript">
alert("Er is een fout opgetreden, probeer nog eens of contaceer de beheerder.")
</script>
<?
}
}
?>