Can not save form data to MySQL databases

this my code for creating a user:

    static public function ctrCreateUser(){
		if (isset($_POST["newUser"])) {
			if (preg_match('/^[a-zA-Z0-9 ]+$/', $_POST["newName"]) &&
				preg_match('/^[a-zA-Z0-9]+$/', $_POST["newUser"]) &&
				preg_match('/^[a-zA-Z0-9]+$/', $_POST["newPasswd"])){
				$photo = "";
				if (isset($_FILES["newPhoto"]["tmp_name"])){

				list($width, $height) = getimagesize($_FILES["newPhoto"]["tmp_name"]);
				$newWidth = 500;
				$newHeight = 500;
				$folder = "views/img/users/".$_POST["newUser"];
				mkdir($folder, 0755);
				if($_FILES["newPhoto"]["type"] == "image/jpeg"){
					$randomNumber = mt_rand(100,999);
					$photo = "views/img/users/".$_POST["newUser"]."/".$randomNumber.".jpg";
					$srcImage = imagecreatefromjpeg($_FILES["newPhoto"]["tmp_name"]);
					$destination = imagecreatetruecolor($newWidth, $newHeight);
					imagecopyresized($destination, $srcImage, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);
					imagejpeg($destination, $photo);
				if ($_FILES["newPhoto"]["type"] == "image/png") {

					$randomNumber = mt_rand(100,999);
					$photo = "views/img/users/".$_POST["newUser"]."/".$randomNumber.".png";
					$srcImage = imagecreatefrompng($_FILES["newPhoto"]["tmp_name"]);
					$destination = imagecreatetruecolor($newWidth, $newHeight);
					imagecopyresized($destination, $srcImage, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);
					imagepng($destination, $photo);
			$table = 'users';
			$encryptpass = crypt($_POST["newPasswd"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');
			$data = array('name' => $_POST["newName"],
						  'user' => $_POST["newUser"],
							'password' => $encryptpass,
							'profile' => $_POST["newProfile"],
							'photo' => $photo);
			$answer = UsersModel::mdlAddUser($table, $data);
			if ($answer == 'ok') {

complete code is here
with comments thanks.

And which error are you getting from PHP? If you don’t know, try to enable PHP error log reporting.

no PHP error I enable PHP_error in debugging
I test my app in chromium no problem but with compiled exe no error but no save data to msql “i think MySQL can not get data from array in exeout”
this is very short and easy: it is also not works

static public function ctrCreateCu(){

			if(preg_match('/^[a-zA-Z0-9]+$/', $_POST["newCu"]) &&
			   preg_match('/^[()\-0-9 ]+$/', $_POST["newPhone"]) && 
			   preg_match('/^[#\.\-a-zA-Z0-9 ]+$/', $_POST["newAddress"])){

			   	$table = "cu";

			   	$data = array("name"=>$_POST["newCu"],

			   	$answer = ModelCu::mdlAddCu($table, $data);

			   	if($answer == "ok"){







it is possible that I send my app. for troubleshooting . thanks

If you are using crypt, did you check that you enabled all required PHP extensions?

yes I test extensions but still not working please if you check my app files for problem.

If you are OK to share your files with us, please open a ticket at Contact Us - G.D.G. Software