mirror of https://github.com/itflow-org/itflow
Define the number regex as a constant and use that instead
This commit is contained in:
parent
a74dea8c22
commit
467784cb2a
|
|
@ -1,10 +1,12 @@
|
|||
<?php
|
||||
define('number_regex', '/[^0-9]/');
|
||||
|
||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_name'])));
|
||||
$title = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_title'])));
|
||||
$department = intval($_POST['contact_department']);
|
||||
$phone = preg_replace("/[^0-9]/", '',$_POST['contact_phone']);
|
||||
$extension = preg_replace("/[^0-9]/", '',$_POST['contact_extension']);
|
||||
$mobile = preg_replace("/[^0-9]/", '',$_POST['contact_mobile']);
|
||||
$phone = preg_replace(number_regex, '', $_POST['contact_phone']);
|
||||
$extension = preg_replace(number_regex, '', $_POST['contact_extension']);
|
||||
$mobile = preg_replace(number_regex, '', $_POST['contact_mobile']);
|
||||
$email = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_email'])));
|
||||
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_notes'])));
|
||||
$auth_method = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_auth_method'])));
|
||||
|
|
|
|||
Loading…
Reference in New Issue