$rootPath = $router->rootPath; $redis = new RedisSingleton(); $errorRunner = new ErrorRunner(); $logger = new FullLog('Customer Create Form'); $mysqli = new MySQLISingleton(); $_SESSION['maxfiles'] = ini_get('max_file_uploads'); $_SESSION['postmax'] = FileUploader::convertToBytes(ini_get('post_max_size')); $_SESSION['displaymax'] = FileUploader::convertFromBytes($_SESSION['postmax']); $max = 200 * 1024; $errors = $usersExist = []; if (isset($_POST['submitUsers'])) { $usersExist['users'] = []; $usersSearch = isset($_POST['usersSearch']) ? $_POST['usersSearch'] : null; if ($usersSearch) { $query = "SELECT username FROM customers WHERE username = '******'"; $res = $mysqli->query($query); if (!$res) { $errors[] = "On Query:<br/> [{$query}] <p>An Error Type of [{$mysqli->errno}] was generated.</p>\n <p>With a Message of: {$mysqli->error} on PHP line " . __LINE__ . " in file " . __FILE__ . "</p>"; } if ($res) { foreach ($res as $row) { $usersExist['users'][] = $row; } } } } if (isset($_POST['submit'])) { $username = isset($_POST['inputUsername']) ? $_POST['inputUsername'] : null; $email = isset($_POST['inputEmail']) ? $_POST['inputEmail'] : null; $name = isset($_POST['inputName']) ? $_POST['inputName'] : null; $subject = isset($_POST['inputSubject']) ? $_POST['inputSubject'] : null;