execute(array failure. $result always false

this code is a part from my Register site. i always get an error. Is this part of code correct?

Thank you.

if(!$error) {     $passwort_hash = password_hash($passwort, PASSWORD_DEFAULT);          $statement = $pdo->prepare("INSERT INTO users (username, passwort, permission, playtime, rank, clothingtime, active, activetraining, timesincebf) VALUES (:username, :passwort, guest, 0, 0, 0, 0, 0, 0)");     $result = $statement->execute(array('username' => $username,                                         'passwort' => $passwort_hash,                                         'permission' => 'guest',                                         'playtime' => '0',                                         'rank' => '0',                                         'clothingtime' => '0',                                         'active' => '0',                                         'activetraining' => '0',                                         'timesincebf' => '0'));     if($result) {                echo 'User add';         $showFormular = false;         $showFormular = true;     } else {         echo 'error<br>';     } } 
Asked on September 1, 2020 in Sql.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.