Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP User Authentication Adding Authentication to Your Application Securing Passwords

Securing Passwords - Error

" Notice: Use of undefined constant PASSWORD_DEFUALT - assumed 'PASSWORD_DEFUALT' in /home/treehouse/workspace/procedures/doRegister.php on line 17

Warning: password_hash() expects parameter 2 to be integer, string given in /home/treehouse/workspace/procedures/doRegister.php on line 17

Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 users.password may not be NULL in /home/treehouse/workspace/inc/functions.php:129 Stack trace: #0 /home/treehouse/workspace/inc/functions.php(129): PDOStatement->execute() #1 /home/treehouse/workspace/procedures/doRegister.php(19): createUser('lightsnoon99@gm...', NULL) #2 {main} thrown in /home/treehouse/workspace/inc/functions.php on line 129"

I wrote everything she wrote, literally going through this 3 times without finding a single error on my code. Here's the snapshot, http://w.trhou.se/63dz4kxskx godspeed

1 Answer

It's literally telling you on the first line.

You've spelled PASSWORD_DEFAULT wrong.