POST input deduplication/'models'

- Ongoing deduplication/conversion of post.php to use re-usable 'models' for input
- Also converting file upload checks to use a function instead
This commit is contained in:
Marcus Hill
2023-02-13 00:02:23 +00:00
parent 980260c696
commit 7bcb2f1c8c
12 changed files with 159 additions and 270 deletions

4
models/category.php Normal file
View File

@@ -0,0 +1,4 @@
<?php
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['name'])));
$type = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['type'])));
$color = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['color'])));