当我用带有扩展名.nl的电子邮件填写我的表单时,它会发送到我的表但没有.nl所以它只是xxxx @ xxxx没有.nl 这是代码:
表格HTML
<form method="POST" id="commentForm" class="cmxform" name="contact" action="index.php?page=contact">
<table>
<tr><td><input type="text" name="naam" maxlength="20" id="naam" tabindex="1" placeholder="Naam" class="text"/> <i> *</i></td></tr>
<tr><td><input type="text" name="tel" maxlength="12" id="tel" tabindex="2" placeholder="Telefoonnummer" class="tel"/></td></tr>
<tr><td><input type="email" name="email" maxlength="50" id="email" tabindex="3" placeholder="E-mail" class="email" /> <i> *</i></td></tr>
<tr><td><textarea id="extra" name="extra" maxlength="100" tabindex="4" placeholder="Extra informatie" class="extra"/></textarea></td></tr>
<tr><td><input type="submit" class="modal_button" name="submit" tabindex="5" value="Versturen" id="submit"></td></tr>
</table>
</form>
THE JQUERY VALIDATOR
<script type="text/javascript">
$("#commentForm").validate({
rules: {
email: {
required: true,
email: true
},
naam: {
required: true
}
}
});
</script>
PHP
<?php
if(isset($_POST["email"])){
$naam = $_POST['naam'];
$tel = $_POST['tel'];
$email = $_POST['email'];
$extra = $_POST['extra'];
$query = "INSERT INTO wd_contact (naam, email, telefoonnummer, bericht)
VALUES ('".$naam."', '".$tel."', '".$email."', '".$extra."')";
$query1 = mysqli_query($con, $query);
mysqli_real_escape_string($query1);
echo "<script type='text/javascript'>
$('.modal_button').avgrund();
</script>";
} else {
"Bericht versturen mislukt.
Probeer het later nog eens";
}
?>