added as per qa
This commit is contained in:
@@ -18,6 +18,11 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
$subject = htmlspecialchars(trim($_POST['subject']));
|
||||
$message = htmlspecialchars(trim($_POST['message']));
|
||||
|
||||
if (!preg_match('/^[0-9]{10}$/', $_POST['phone'])) {
|
||||
$errors[] = "Please enter a valid 10-digit phone number.";
|
||||
}
|
||||
|
||||
|
||||
if (!empty($name) && !empty($user_email) && !empty($phone) && !empty($subject) && !empty($message) && !empty($address)) {
|
||||
try {
|
||||
// Send confirmation email to user
|
||||
|
Reference in New Issue
Block a user