Rever old test run of using prepared mysql statement for client add /edit

This commit is contained in:
johnnyq
2026-08-01 18:20:43 -04:00
parent 6107d9f833
commit 056db263a5
2 changed files with 45 additions and 217 deletions

View File

@@ -1,16 +1,16 @@
<?php
defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
$name = cleanInput($_POST['name']);
$type = cleanInput($_POST['type']);
$website = preg_replace("(^https?://)", "", cleanInput($_POST['website']));
$referral = cleanInput($_POST['referral']);
$name = escapeSql($_POST['name']);
$type = escapeSql($_POST['type']);
$website = preg_replace("(^https?://)", "", escapeSql($_POST['website']));
$referral = escapeSql($_POST['referral']);
$rate = floatval($_POST['rate'] ?? 0);
$net_terms = intval($_POST['net_terms'] ?? $config_default_net_terms);
$tax_id_number = cleanInput($_POST['tax_id_number'] ?? '');
$abbreviation = cleanInput($_POST['abbreviation'] ?? '');
$tax_id_number = escapeSql($_POST['tax_id_number'] ?? '');
$abbreviation = escapeSql($_POST['abbreviation'] ?? '');
if (empty($abbreviation)) {
$abbreviation = shortenClientName($name);
}
$notes = cleanInput($_POST['notes'] ?? '');
$notes = escapeSql($_POST['notes'] ?? '');
$lead = intval($_POST['lead'] ?? 0);