0byt3m1n1
Path:
C:
/
GEOMATICS 23-01-2021
/
LAN
/
drought
/
[
Home
]
File: index.php
<?php session_start(); /*include("database.php"); $data=mysql_query("SELECT * FROM login"); while($result=mysql_fetch_array($data)) { $var=$result['login_name']; $pass=$result['password']; */ if(isset($_POST['submit'])) { $password = $_POST['passwd']; $var= $_POST['uname']; session_register($var); if ( ( $var == "admin" ) && ( $password == "p@ss4lan")) { header("Location:home.php?name=".$var); exit(); } else { $error= "Invalid login"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Login</title> <style type="text/css"> <!-- body,td,th { color: #FFF; } --> </style> <form action="index.php" method="post"> </head> <body> <p> </p> <p> </p> <p> </p> <p> </p> <table width="40%" border="0" align="center"> <tr> <td align="center" bgcolor="#1E89A8"><p> </p> <h2>User Login</h2> <p> </p> <p><strong>User name: <input type="text" name="uname" /> </strong></p> <p><strong> Password: <input type="password" name="passwd" /></strong></p> <p> <input type="submit" name="submit" id="login" value="Login" /></p> <p> </p></td> </tr> </table> <p> </p> </body> </html>