Onbekend |
|
Hoi
Vraagje hoe moet je hier een email chekker op zette ?
<form method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8%"><font color="#666666">To:</font><font face="Arial" color="#666666">
</font> </td>
<td width="92%">
<font color="#666666" face="Arial">
<Select style="border: 1px solid #000000" size=1 name=naar>
<option value=>Paul Lahaye</option>
<option value=>Nympha Stassen</option>
<option value=>Mike Lahaye</option>
<option value=>Rick Lahaye</option>
<option value=>Chris Lahaye (webmaster)</option>
</select> </font></td>
</tr>
<tr>
<td width="8%"><font face="Arial" color="#666666">Name:
</font> </td>
<td width="92%">
<font color="#666666" face="Arial">
<input type="text" name="Naam" size="30" bgcoler="#C0C0C0" maxlength="30" style="border: 1px solid #000000"></font></td>
</tr>
<tr>
<td width="8%"><font face="Arial" color="#666666">
E-mail: </font></td>
<td width="92%">
<font color="#666666" face="Arial">
<input type="text" name="Email" size="30" style="border: 1px solid #000000" maxlength="30">
</font>
</td>
</tr>
<tr>
<td width="8%" height="340" align="left" valign="top"><font face="Arial" color="#666666">
Message: </font></td>
<td width="92%" height="340">
<font color="#666666" face="Arial">
<textarea name="Bericht" maxlength="500" rows="20" cols="42" style="border: 1px solid #000000"></textarea><br>
</font></td>
</tr>
<tr>
<td width="8%"><font face="Arial" color="#666666"> </font> </td>
<td width="92%">
<font face="Arial"><font color="#666666">
<input style="border: 1px solid #000000; font-weight: bold" type="button" value="B" name="B3" onClick="javascript:addtext('Bericht','[b]Bold Text[/b]')" style="font-weight:bold;">
<input type="button" style="border: 1px solid #000000; font-style: italic" value="I" name="B4" onClick="javascript:addtext('Bericht','[i]Italic Text[/i]')" style="font-style:italic;">
<input type="button" style="border: 1px solid #000000; text-decoration: underline" value="U" name="B5" onClick="javascript:addtext('Bericht','[u]Underline Text[/u]')" style="text-decoration: underline;">
<img border="0" alt="Happy" src="../fotos/smileys/blij.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(^_^)')">
<img border="0" alt="Shout" src="../fotos/smileys/huh.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(?)')">
<img border="0" alt="Shy" src="../fotos/smileys/rood.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(]0)')">
<img border="0" alt="Cheeky" src="../fotos/smileys/tong.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(o=)')">
<img border="0" alt="What?" src="../fotos/smileys/vragen.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(#$%)')">
<img border="0" alt="Surprised" src="../fotos/smileys/whow.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(#^&)')">
<img border="0" alt="Beer" src="../fotos/smileys/bier.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(#*_)')">
<img border="0" alt="Nasty" src="../fotos/smileys/bah.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(!@#)')">
<br>
</font></td>
</tr>
<tr>
<td width="8%"> </td>
<td width="92%">
<font color="#666666" face="Arial">
<input type="submit" name="Submit" value="Send" style="border: 1px solid #000000">
<input type="reset" name="Reset" value="Remove text" style="border: 1px solid #000000"></font></td>
</tr>
</table>
</form>
<font color="#666666">
</body>
</html>
</font></font><font color="#666666"><font face="Arial">
</font></font>
<p>
<font face="Arial" color="#000000">
<?php
// Zet hier je eigen e-mailadres neer!
if($_SERVER['REQUEST_METHOD'] == 'POST'){
if($_POST['Naam'] == ""){
echo"<script language=\"JavaScript\">alert(\"Please fill in all fiels!\")</script>"; }
elseif($_POST['Email'] == ""){
echo"<script language=\"JavaScript\">alert(\"Please fill in all fiels!\")</script>"; }
elseif($_POST['Bericht'] == ""){
echo"<script language=\"JavaScript\">alert(\"Please fill in all fiels!\")</script>"; }
else {
$Afzender_email = $_POST['Email'];
$Afzender_naam = $_POST['Naam'];
$Datum = "Datum van verzenden: " . date("Y-m-d H:i:s") . "\n";
$Bericht = $_POST['Bericht'];
$Bericht = str_replace("(^_^)","<img src=http://www.lahaye.ws/fotos/smileys/blij.gif border=0>", $Bericht);
$Bericht = str_replace("(?)","<img src=http://www.lahaye.ws/fotos/smileys/huh.gif border=0>", $Bericht);
$Bericht = str_replace("(]0)","<img src=http://www.lahaye.ws/fotos/smileys/rood.gif border=0>", $Bericht);
$Bericht = str_replace("(o=)","<img src=http://www.lahaye.ws/fotos/smileys/tong.gif border=0>", $Bericht);
$Bericht = str_replace("(#$%)","<img src=http://www.lahaye.ws/fotos/smileys/vragen.gif border=0>", $Bericht);
$Bericht = str_replace("(#^&)","<img src=http://www.lahaye.ws/fotos/smileys/whow.gif border=0>", $Bericht);
$Bericht = str_replace("(#*_)","<img src=http://www.lahaye.ws/fotos/smileys/bier.gif border=0>", $Bericht);
$Bericht = str_replace("(!@#)","<img src=http://www.lahaye.ws/fotos/smileys/bah.gif border=0>", $Bericht);
$Bericht = str_replace("[b]","<b>", $Bericht);
$Bericht = str_replace("[/b]","</b>", $Bericht);
$Bericht = str_replace("[i]","<i>", $Bericht);
$Bericht = str_replace("[/i]","</i>", $Bericht);
$Bericht = str_replace("[u]","<u>", $Bericht);
$Bericht = str_replace("[/u]","</u>", $Bericht);
$ipadres=$_SERVER['REMOTE_ADDR'];
$headers= "MIME-Version: 1.0\r\n";
$headers= "Content-Type: text/html; charset=iso-8859-1\r\n";
mail("$naar", "Website mail", "
Naam: $_POST[Naam] <br>
Email: $_POST[Email] <br>
IP: $ipadres <br>
Bericht: $Bericht <br>
$Datum
", "$headers From: lahaye.ws\nReturn-path: $Afzender_email ");
echo "<script language=\"JavaScript\">alert(\"Your message is sent!\")</script>";
} } else { ?>
</font>
<? } ?>
<form method="post"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="8%"><font color="#666666">To:</font><font face="Arial" color="#666666"> </font> </td> <td width="92%"> <font color="#666666" face="Arial"> <Select style="border: 1px solid #000000" size=1 name=naar> <option value=>Paul Lahaye</option> <option value=>Nympha Stassen</option> <option value=>Mike Lahaye</option> <option value=>Rick Lahaye</option> <option value=>Chris Lahaye (webmaster)</option> </select> </font></td> </tr> <tr> <td width="8%"><font face="Arial" color="#666666">Name: </font> </td> <td width="92%"> <font color="#666666" face="Arial"> <input type="text" name="Naam" size="30" bgcoler="#C0C0C0" maxlength="30" style="border: 1px solid #000000"></font></td> </tr> <tr> <td width="8%"><font face="Arial" color="#666666"> E-mail: </font></td> <td width="92%"> <font color="#666666" face="Arial"> <input type="text" name="Email" size="30" style="border: 1px solid #000000" maxlength="30"> </font> </td> </tr> <tr> <td width="8%" height="340" align="left" valign="top"><font face="Arial" color="#666666"> Message: </font></td> <td width="92%" height="340"> <font color="#666666" face="Arial"> <textarea name="Bericht" maxlength="500" rows="20" cols="42" style="border: 1px solid #000000"></textarea><br> </font></td> </tr> <tr> <td width="8%"><font face="Arial" color="#666666"> </font> </td> <td width="92%"> <font face="Arial"><font color="#666666"> <input style="border: 1px solid #000000; font-weight: bold" type="button" value="B" name="B3" onClick="javascript:addtext('Bericht','[b]Bold Text[/b]')" style="font-weight:bold;"> <input type="button" style="border: 1px solid #000000; font-style: italic" value="I" name="B4" onClick="javascript:addtext('Bericht','[i]Italic Text[/i]')" style="font-style:italic;"> <input type="button" style="border: 1px solid #000000; text-decoration: underline" value="U" name="B5" onClick="javascript:addtext('Bericht','[u]Underline Text[/u]')" style="text-decoration: underline;"> <img border="0" alt="Happy" src="../fotos/smileys/blij.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(^_^)')"> <img border="0" alt="Shout" src="../fotos/smileys/huh.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(?)')"> <img border="0" alt="Shy" src="../fotos/smileys/rood.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(]0)')"> <img border="0" alt="Cheeky" src="../fotos/smileys/tong.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(o=)')"> <img border="0" alt="What?" src="../fotos/smileys/vragen.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(#$%)')"> <img border="0" alt="Surprised" src="../fotos/smileys/whow.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(#^&)')"> <img border="0" alt="Beer" src="../fotos/smileys/bier.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(#*_)')"> <img border="0" alt="Nasty" src="../fotos/smileys/bah.gif" width="19" height="19" onClick="javascript:addtext('Bericht','(!@#)')"> <br> </font></td> </tr> <tr> <td width="8%"> </td> <td width="92%"> <font color="#666666" face="Arial"> <input type="submit" name="Submit" value="Send" style="border: 1px solid #000000"> <input type="reset" name="Reset" value="Remove text" style="border: 1px solid #000000"></font></td> </tr> </table> </form> <font color="#666666"> </body> </html> </font></font><font color="#666666"><font face="Arial"> </font></font> <p> <font face="Arial" color="#000000"> <?php // Zet hier je eigen e-mailadres neer! if($_SERVER['REQUEST_METHOD'] == 'POST'){ if($_POST['Naam'] == ""){ echo"<script language=\"JavaScript\">alert(\"Please fill in all fiels!\")</script>"; } elseif($_POST['Email'] == ""){ echo"<script language=\"JavaScript\">alert(\"Please fill in all fiels!\")</script>"; } elseif($_POST['Bericht'] == ""){ echo"<script language=\"JavaScript\">alert(\"Please fill in all fiels!\")</script>"; } else { $Afzender_email = $_POST['Email']; $Afzender_naam = $_POST['Naam']; $Datum = "Datum van verzenden: " . date("Y-m-d H:i:s") . "\n"; $Bericht = $_POST['Bericht']; $Bericht = str_replace("(^_^)","<img src=http://www.lahaye.ws/fotos/smileys/blij.gif border=0>", $Bericht); $Bericht = str_replace("(?)","<img src=http://www.lahaye.ws/fotos/smileys/huh.gif border=0>", $Bericht); $Bericht = str_replace("(]0)","<img src=http://www.lahaye.ws/fotos/smileys/rood.gif border=0>", $Bericht); $Bericht = str_replace("(o=)","<img src=http://www.lahaye.ws/fotos/smileys/tong.gif border=0>", $Bericht); $Bericht = str_replace("(#$%)","<img src=http://www.lahaye.ws/fotos/smileys/vragen.gif border=0>", $Bericht); $Bericht = str_replace("(#^&)","<img src=http://www.lahaye.ws/fotos/smileys/whow.gif border=0>", $Bericht); $Bericht = str_replace("(#*_)","<img src=http://www.lahaye.ws/fotos/smileys/bier.gif border=0>", $Bericht); $Bericht = str_replace("(!@#)","<img src=http://www.lahaye.ws/fotos/smileys/bah.gif border=0>", $Bericht); $ipadres=$_SERVER['REMOTE_ADDR']; $headers= "MIME-Version: 1.0\r\n"; $headers= "Content-Type: text/html; charset=iso-8859-1\r\n"; mail("$naar", "Website mail", " Naam: $_POST[Naam] <br> Email: $_POST[Email] <br> IP: $ipadres <br> Bericht: $Bericht <br> $Datum ", "$headers From: lahaye.ws\nReturn-path: $Afzender_email "); echo "<script language=\"JavaScript\">alert(\"Your message is sent!\")</script>"; } } else { ?> </font> <? } ?>
ALvast bedankt
|