Please help I have created MVC with PDO, POS system ,when INSERTING INTO database nothing is executed and no error

require_once “connection.php”;

static public function mdlAddUsers($table,$data){

	$stmt = Connection::connect()->prepare("INSERT INTO $table(name, user, 

password, profile) VALUES (:name, :user, :password, :profile)");

	$stmt -> bindParam(":name", $data["name"], PDO::PARAM_STR);
	$stmt -> bindParam(":user", $data["user"], PDO::PARAM_STR);
	$stmt -> bindParam(":password", $data["password"], PDO::PARAM_STR);
	$stmt -> bindParam(":profile", $data["profile"], PDO::PARAM_STR);
	// $stmt -> bindParam(":photo", $data["photo"], PDO::PARAM_STR);

	if ($stmt->execute()) {
		return 'ok';

	} else {
		return 'error';


	$stmt -> close();

	$stmt = null;


Does it have to do with a Version of PHP???