Hiding a Login Form after successful login

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
  1. <?php session_start();
  2. $valid = $_SESSION['valid'];
  3. ?>

  4. <html>
  5. <head>
  6. <title> Login </title>
  7. <script type='text/javascript' src='http://localhost:8888/mysite/jquery.min.js'></script>
  8. <script type='text/javascript' src='http://localhost:8888/mysite/script.js'></script>
  9. </head>
  10. <body>
  11. <link rel="stylesheet" type="text/css" href="http://localhost:8888/mysite/form.css" />

  12. <script src="http://localhost:8888/mysite/nav.js"></script>

  13. <div id="loginform">
  14. <form action=login.php method=POST>

  15. <label for=username> Username: </label>
  16. <input type=text name=username> <br>

  17. <label for=password> Password: </label>
  18. <input type=password name=password> <br>
  19. <input type=submit value=Login class=button>

  20. </form>
  21. </div>

  22. </body>
  23. </html>