File manager - Edit - /home/autoph/public_html/data03252025consolidation/app/affiliation/add_affiliation.php
Back
<?php include_once("../../cfg/db.php"); $new_affiliation = $db->escape(trim(strtoupper($_POST['new_affiliation']))); $current_user = $_SESSION['user']['id']; if(intval($db -> select("SELECT count(1) FROM customer_affiliations_category WHERE name = '$new_affiliation'")) > 0){ $return_arr['status'] = 0; //duplicate affiliation name $return_arr['message'] = "Affliation category already existing"; echo json_encode($return_arr); } else { $db->sql_query("INSERT INTO `customer_affiliations_category` (`name`, `added_by`) VALUES('$new_affiliation', '$current_user')"); $return_arr['status'] = 1; echo json_encode($return_arr); } ?>
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings