Hiding a Login Form after successful login
I'm extremely new to jQuery so please bear with me.
I've made a form that allows the user to type in their username and password, this form is then submitted to login.php which then checks the user's inputted info with a mysql database
i want to make it so that if the user is logged it, the login form doesn't show up.
i am using session variables (not sure if tht's relevant)
Please let me know if there is any more code i should post
- <?php session_start();
- $valid = $_SESSION['valid'];
- ?>
- <html>
- <head>
- <title> Login </title>
- <script type='text/javascript' src='http://localhost:8888/mysite/jquery.min.js'></script>
- <script type='text/javascript' src='http://localhost:8888/mysite/script.js'></script>
- </head>
- <body>
- <link rel="stylesheet" type="text/css" href="http://localhost:8888/mysite/form.css" />
- <script src="http://localhost:8888/mysite/nav.js"></script>
- <div id="loginform">
- <form action=login.php method=POST>
- <label for=username> Username: </label>
- <input type=text name=username> <br>
- <label for=password> Password: </label>
- <input type=password name=password> <br>
- <input type=submit value=Login class=button>
- </form>
- </div>
- </body>
- </html>