SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

Wenn ich prepare und execute mit $ _POST als Array verwende bekomme eine Fehlermeldung. Meine PHP-Code:

<?php

            include("db.php");

             $stmt = $conn->prepare("insert into users (username, password, email, firstname, lastname, street, postcode) values (:username, :password, :email, :firstname, :lastname, :street, :postcode)");

            

            $stmt->execute( $_POST );

?>

MySQL Fehler sieht so aus:

SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

 

 

Neuen Kommentar schreiben

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Suche

Neueste Kommentare