MySQLi Stmt Excute problem

I’m using MySQLi and I’m also using stmt to secure my code, but I get an error saying:

Fatal error: Call to undefined function mysqli_stmt_excute() in C:\xampp\htdocs\register.php on line 47

Here is my PHP code:
[php]* Define our security Method. */
define(‘CF_secure’,1);

/* Require the main grid. */
require_once ‘root.core.php’;

/* Require the config file. */
require_once ‘inc/inc.config.php’;

/* Require the database file. */
require_once ‘inc/classes/class.database.php’;

/* Require the secure file. */

/* Require the template.
require_once(‘pub/tpl_default/template.css’);
require_once(‘pub/tpl_default/template1.css’);*/

/* Set directory to tpl and 404 page. */
define(‘error’, ‘404’);
define(‘version’, cms_version);
define(‘creator’, cms_creator);
define(‘cf’, cms_cf);

$mysqli = mysqli_connect("localhost", "root", "root", "hybrid");

$username = $mysqli->escape_string($_POST['username']);
$password = SHA1(mysqli_escape_string($mysqli, $_POST['password']));
$email = mysqli_escape_string($mysqli, $_POST['email']);

$query = “INSERT INTO users(username, password, email) VALUES(?,?,?)”;
$stmt = mysqli_prepare($mysqli, $query);
if (!$stmt) {
die(‘MySQLi Error:’. mysqli_error($mysqli));
}
mysqli_stmt_bind_param($stmt, ‘sss’,$username,$password,$email);
mysqli_stmt_execute($stmt);

if (!mysqli_stmt_excute($stmt)) {
die(‘Stmt Error’. mysqli_stmt_error($stmt));
}

if(!empty($username) && !empty($password) && !empty($email)) {
echo “Okay”;
} else {
echo “All fields are required”;
}

mysqli_close();
echo “You have successfully registered!”;
?>

Registeration! Username:
Password:
E-mail:
[/php]

What could be the problem?

You spelled execute wrong

mysqli_stmt_execute

How can I not see that? Anyways now I get three errors saying [PHP]Notice: Undefined variable: username in C:\xampp\htdocs\register.php on line 36

Notice: Undefined variable: password in C:\xampp\htdocs\register.php on line 37

Notice: Undefined variable: email in C:\xampp\htdocs\register.php on line 38[/PHP]

nvm I have fixed it the issue, thanks for the help!

Sponsor our Newsletter | Privacy Policy | Terms of Service