Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Need help with login form Reply To: Need help with login form

#203239
Anonymous
Inactive

My comment was in response to this:

the purpose of it is to make sure that nobody registers a username that isn’t a minimum of 6 characters

As to my hardcoded comment, I was just trying to show why your code wasn’t working as expected.

':username'

is a hardcoded, 9 character string.

$username

is a variable. You can give it a value that is provided by your users.

strlen(':username')

will always return 9, which is more than 6.

strlen($username)

Will return whatever length it’s set to.

Hope that’s helpful. On a phone again so sorry for the limited code samples!