Onbekend |
|
Beste mensen,
Op een of andere manier werkt mijn script niet.
Iemand een idee hoe dit kan?
<p class='title'>Contact</p>
<?php
if(isset($_POST['verzenden']))
{
$naam_ontvanger = 'naam';
$email_ontvanger = 'email';
$naam_verzender = $_POST['naam'];
$email_verzemder = $_POST['email'];
$onderwerp = $_POST['onderwerp'];
$header = 'From: '.$naam_verzender.'('.$email_verzender.') \r\n';
$header = 'Mime-Version: 1.0 \r\n';
$header = 'Content-type: text/html; charset=iso8859-1 \r\n';
$header = 'Return-path: Mail-error (error@activion.net) \r\n';
$header = 'Reply-to: '.$naam_verzender.' ('.$email_verzender.') \r\n';
$bericht = nl2br($_POST['bericht']);
mail($onderwerp, $bericht, $header))
echo "<p class='text'>'Uw bericht is succesvol verzonden.'</p>";
}
else
{
?>
<form action='<?php $_SERVER['Php_Self']; ?>' method='post'>
<table cellpadding='0' cellspacing='0'>
<tr>
<td>Naam:</td>
<td><input name='naam' type='text'/></td>
</tr>
<tr>
<td>Email:</td>
<td><input name='email' type='text'/></td>
</tr>
<tr>
<td>Onderwerp:</td>
<td><input name='onderwerp' type='text'/></td>
</tr>
<tr>
<td>Bericht:</td>
<td><textarea name='bericht'></textarea></td>
</tr>
<tr>
<td> </td>
<td><input name='verzenden' type='submit' value='Verzenden'/></td>
</tr>
</table>
</form>
<?php
}
?>
<p class='title'>Contact</p> <?php if(isset($_POST['verzenden'])) { $naam_ontvanger = 'naam'; $email_ontvanger = 'email'; $naam_verzender = $_POST['naam']; $email_verzemder = $_POST['email']; $onderwerp = $_POST['onderwerp']; $header = 'From: '.$naam_verzender.'('.$email_verzender.') \r\n'; $header = 'Mime-Version: 1.0 \r\n'; $header = 'Content-type: text/html; charset=iso8859-1 \r\n'; $header = 'Return-path: Mail-error (error@activion.net) \r\n'; $header = 'Reply-to: '.$naam_verzender.' ('.$email_verzender.') \r\n'; $bericht = nl2br($_POST['bericht']); mail($onderwerp, $bericht, $header)) echo "<p class='text'>'Uw bericht is succesvol verzonden.'</p>"; } else { ?> <form action='<?php $_SERVER['Php_Self']; ?>' method='post'> <table cellpadding='0' cellspacing='0'> <tr> <td>Naam:</td> <td><input name='naam' type='text'/></td> </tr> <tr> <td>Email:</td> <td><input name='email' type='text'/></td> </tr> <tr> <td>Onderwerp:</td> <td><input name='onderwerp' type='text'/></td> </tr> <tr> <td>Bericht:</td> <td><textarea name='bericht'></textarea></td> </tr> <tr> <td> </td> <td><input name='verzenden' type='submit' value='Verzenden'/></td> </tr> </table> </form> <?php } ?>
Alvast bedankt .
Mvg, Rvb
|