<div id="judul"> HALAMAN LOGIN </div> <div id="inputan"> <form method="POST" action="" onSubmit="return validasi(this)"> <div> <input type="text" name="username" class="lg" placeholder="Username" /> </div> <div style="margin-top:10px"> <input type="password" name="password" class="lg" placeholder="Password" /> </div> <div style="margin-top:10px"> <input type="submit" name="login" class="btn" value="LOGIN" /> </div> </form> <?php include "controller/loginController.php"; if (@$_POST['login']) { $main = new loginController(); $main->login(); } ?> </div> </div> </div> </body> </html> <?php } else { header("location:index.php"); }