I created Database with using the details from the signup Form. Now how can I retrieve that data through correct password with it's corresponding Enrollment Number?
![](https://static.wixstatic.com/media/a27d24_a070feaba7b944558aa5f505d7eaa23c~mv2.png/v1/fill/w_980,h_551,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/a27d24_a070feaba7b944558aa5f505d7eaa23c~mv2.png)
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
Hi Tejas,
In the current configuration, you can switch the student attendance page to dynamic, in order to display the relevant item when a user is navigated to the page.
Then you could write a code similar to the example below to check the user and pass against the collection and navigate the user to the enrollment ("Student Attendance") page if the information is correct.
let pass = $w('#pass').value; let user = $w('#user').value; wixData.query("myCollection") .eq("user", user) .eq("password", pass) .find().then(res => { if (res.items > 0) { //user and pass match, navigate user to enrollment page wixLocation.to("/enrollmentPage?" + res.items[0].enrollment) } else { //wrong user and pass, display error. } }) .catch(err => { console.log("Unable to access collection: " + err) })
However there are couple of issues with this approach.
The first - sensitive login information is combined with other information. This means that every time you'll need to access the enrollment info, you will also be accessing the login information.
A more secure approach will be to split the collection into "member profiles" collection, which only stores the user, password and the user id (you can use the built-in _id field) and another collection with the relevant information, with a reference to the _id field.
The second - the login information is stored and transmitted in plain text, which is less than optimal.
The solution here is to use password hashing. The server sends a random string to the client > the client then adds the random string to the password, hashes it and only then it is transmitted to the server, which then decrypts the hash. You can find more info about login hashing online.
This is my database.
Now I want to retrieve that data by giving the enrollment and password. The data should display on another page in the form of table as I click on Login Button. (This data should be display in a table if the enrollment and password will be match with the content of the database)
Please add more details, screenshots, code to your question so it will be easier to see where you are in your project.