i am designing an app. The first stage is to allow the user to select a username and password. The system stores it and uses it as an authentication during login.
my question is: do i use a fucntion or an array to capture the login info for the first time

you don't want to do any of that.
https://crackstation.net/hashing-security.htm

Do NOT try to store passwords unless you have to, and then only do it if you really know what you're doing (and if you're asking this, you don't).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.