i have a long contact form in my car website that as you can see customer must field the form with her or his name, car model car tip and mobile number and etc as you see i have a condition for email and if it was not valid it gives an error massage and clean all the previous fields which customer has filled,
<?php
error_reporting(0);
include("config_mashin.php");
$namee = mysqli_real_escape_string($connect, $_POST['namee']);
$modell = mysqli_real_escape_string($connect, $_POST['modell']);
$tipp = mysqli_real_escape_string($connect, $_POST['tipp']);
$colorr = mysqli_real_escape_string($connect, $_POST['colorr']);
$exchangee = mysqli_real_escape_string($connect, $_POST['exchangee']);
$pricee = mysqli_real_escape_string($connect, $_POST['pricee']);
$loan = mysqli_real_escape_string($connect, $_POST['loan']);
$family = mysqli_real_escape_string($connect, $_POST['family']);
if (!empty($_POST['emaill'])) {
$emaill = $_POST['emaill'];
if (!preg_match("/^[_a-z0-9]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $emaill)){
$error .= "The e-mail address you entered is not valid. <br/>";
echo"$error";
}
}
$mobilee = mysqli_real_escape_string($connect, $_POST['mobilee']);
$phonee = mysqli_real_escape_string($connect, $_POST['phonee']);
if(isset($_POST['submit']) && empty($error)){
//insert to database
$insert =mysqli_query($connect,"INSERT INTO $db_table VALUES (i dont write this part to simplify code)");
}
?>
is there any way to keep other fields intact and customer just modify the email part. please help