mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
POST 'models'
Deduplicate POST value assignment for add/edit operations in post.php with a 'model' concept. This should also help prevent things breaking when one of the functions are updated but the other is missed.
This commit is contained in:
8
models/client.php
Normal file
8
models/client.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['name'])));
|
||||
$type = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['type'])));
|
||||
$website = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['website'])));
|
||||
$referral = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['referral'])));
|
||||
$currency_code = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['currency_code'])));
|
||||
$net_terms = intval($_POST['net_terms']);
|
||||
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['notes'])));
|
||||
Reference in New Issue
Block a user