I’m sure that’s a real easy one, but I begin with php and can’t get what is wrong.
function createUser ($nom, $prenom, $username, $pw, $email)
{
$cnt = new PDO('mysql:host=localhost;dbname=web', 'web', 'webuser');//getConnection ();
$createUser = $cnt.prepare ('INSERT INTO user (NOM, PRENOM, USER_NAME, PW_HASH, EMAIL VALUES (?, ?, ?, ?, ?) ');
$createUser->execute (array ($nom, $prenom, $username, sha1($pw), $email));
}
I get :
Fatal error: Call to undefined function prepare() in /home/pascal/public_html/dataaccess/users.php on line 8
Line 8 being $createUser = $cnt.prepare (...
->, not..