Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>User CP</title>
- <link href="./includes/style/main.css" rel="stylesheet" type="text/css">
- <script src="./includes/jquery-3.1.1.js" type="text/javascript"></script>
- <script type="text/javascript">
- function attemptLogin(){
- var username = document.getElementById("username").value;
- var password = document.getElementById("password").value;
- $.post("./proc.php", {action:"login",username:username,password:password}, function (returnedData) {
- if(returnedData == "success"){
- alert("Success!");
- }
- else
- alert("Error.");
- });
- }
- </script>
- </head>
- <body>
- <nav>
- <ul>
- <li><a href="./index.php">Home</a>
- </ul>
- </nav>
- <div class="container">
- <div class="login">
- <input type="text" placeholder="Username" id="username" /> <br>
- <input type="password" placeholder="Password" id="password" /> <br>
- <input type="submit" value="Login" onClick="attemptLogin()">
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement