我有25个字段的表格。当出现错误并显示警告框时。在警报框上单击“确定”后,所有字段均变为空白。如何防止表格成为空白。到目前为止,我已经尝试过了。
$job_confrm = $_POST['job_confrm'];
$training_no = $_POST['training_no'];
$created_on = date('Y-m-d H:i:s');
$unique_id = rand(100000, 999999);
$ftquery = mysqli_query($con, "SELECT * From hr_employee_service_register where employee_id='$employee_id' AND status='1'");
if (mysqli_num_rows($ftquery) > 0) {
echo '<script>alert("Employee Already Registered");
preventDefault();
return false;</script>';
}