Fatal error: Uncaught ArgumentCountError: Too few arguments to function

后端 未结 4 727
情话喂你
情话喂你 2020-12-09 23:10

I know there was a some questions related to this, but there are in c++ or other languages. I get this error and I\'m not sure what is wrong with my function.

My er

4条回答
  •  攒了一身酷
    2020-12-10 00:01

    Your method needs 5 arguments, you only pass 2: User->register('ds', 'dsssssss')

    Edit this line in Register.php:

    $user->register($username, $password)
    

    to

    $user->register($name, $surname, $username, $password, $email)
    

    Additionally you have this line twice $stmt->bindParam(":password", $password);

提交回复
热议问题