I need help creating a website for my school project, where users can sign up and log in to their accounts without saving usernames and passwords to a database. I want to save the account through local storage instead. Here are my questions:
1: How can I create an account that is saved through local storage?
2: How do I implement a login feature that checks if the username and password are correct before granting access?
Could someone guide me on how to achieve this using jQuery? Thank you in advance!
Here's the HTML structure:
<div id="log-in-modal">
<div class="modal-content">
<span class="close" id="close-log-in">x</span>
<p><label>Username</label><input type="text" id="username"></p>
<p><label>Password</label><input type="password" id="password"></p>
<input type="submit" value="Log In" id="submit">
</div>
</div>
<div id="sign-up-modal">
<div class="modal-content">
<span class="close" id="close-sign-up">x</span>
<p><label>Username</label><input type="text" id="sign-username"></p>
<p><label>Password</label><input type="password" id="sign-password"></p>
<input type="submit" value="Sign Up" id="sign-submit">
</div>
</div>
These modals contain text fields for entering usernames and passwords. They can be accessed by clicking either the "Log In" or "Sign Up" button on the website menu.