Skip to content
Advertisement

Fatal error: Uncaught ArgumentCountError: Too few arguments to function

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 error looks like this:

JavaScript

And my function is:

JavaScript

Register.php file:

JavaScript

Thank you for trying to help!

Advertisement

Answer

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

Edit this line in Register.php:

JavaScript

to

JavaScript

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

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement