Web Programming Assignment-4
Web Programming Assignment-4
<!DOCTYPE html>
<html>
<head>
<title>Login Form</title>
</head>
<body>
<h2>Login Form</h2>
<form action="login.php" method="post">
<div>
<label for="username">Username: </label>
<input type="text" id="username" name="username" required>
</div>
<div>
<label for="password">Password: </label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit">Login</button>
</form>
</body>
<?php
$con = mysqli_connect("Localhost", "root" , "","Login");
if(!$con) {
die("Connection failed: " .mysql_connect_error() );
}
$username = $_PSOT['name'];
$password = $POST['password'];
mysql_close($con);
?>
<body>
<h2>Login Form</h2>
<form action="login.php" method="post">
<div>
<label for="userame"Username: </label>
<input type="text" id="userame" name="text1" required>
<!--name username will be use in mysql as an attribute
This use to intreact -->
</div>
<div>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit">Login</button>
</form>
<?php
?>
</body>
</html>