0
Taking the values in JAVASCRIPT array to another Html page
I have created a sample login page.. In that page, I can register and store values in Js array. and below that, there is a menu called"login". in that, I can enter my username and password and login, behind the page, I will just compare the value stored in array with the newly entered value in login menu.... if okay, it will alert "welcome". But my problem is, I need to create two pages(Register and Login separately), but the data stored in register page is not available in login page. How to fix it?
4 Answers
+ 3
Have a look at Html5 webstorage: https://www.w3schools.com/html/html5_webstorage.asp
It will only work for only one specific user and one specific browser, and doesn't be enough safe for important/sensitive data, but it's the simplest way to handle values through JS between different pages ^^
Other solutions would require server sided stuff, even if you could look at google firebase ( https://firebase.google.com ), but that's more difficult to handle, above all if you're just beginner ;)
+ 1
You can fix the bug using php and the $_SESSION to store data in a session which can be accessed in every pages
0
I'm beginner, I only know js and python....
is there is anyother way to fix it?
0
I need solution in JAVASCRIPT