Adjust contact API to allow department to be text rather than int due to db schema change

This commit is contained in:
Marcus Hill
2022-09-11 11:08:48 +01:00
parent f2f1949ff8
commit b23359ff38
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ 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']);
$department = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_department'])));
$phone = preg_replace(number_regex, '', $_POST['contact_phone']);
$extension = preg_replace(number_regex, '', $_POST['contact_extension']);
$mobile = preg_replace(number_regex, '', $_POST['contact_mobile']);