How to access databases from another file
The reason I want a database is so I can access a database from another file, but I don't know how to. In test.html, I tried to access the database, but it didn't show up. I know I'm doing something wrong. How do I fix this?
When you switch pages, your essentially running entirely different program. In order to make something like that work, you’d have to re-initialize the db. You cannot just run a js script in one page and expect that state to remain intact when you then load a second.
@Highwayman It is written in php, and yes I understand it doesn't have the highest security, I am just doing this for fun, not supposed to be a commercial business.
The login page is just for me to read the feedback, but prevent anyone else from doing so. The next step I am taking is cybersecurity measures, like preventing them from injecting code.