lode

mail@pastecode.io avatar
unknown
php
3 years ago
1.3 kB
11
Indexable
Never
<?php
$connect=mysqli_connect('localhost','root','','loginapp');
if(!$connect){
    die("connection failed.");
}

if(isset($_POST['submit'])){
    $username=$_POST['username'];
    $password=$_POST['password'];
    $query= "SELECT * FROM users'";
    $result = mysqli_query($connect, $query);
    if(!$result){
        die("connection failed".mysqli_error());
    }

}


?>



<!DOCTYPE html>
<html>
<head>
<title>Hello</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
</head>
<body>


<form action="login_update.php" method="post">

<label for="username">USERNAME:</label>
    <input type="text" name="username">


<label for="password">PASSWORD:</label>
    <input type="password"  name="password">


<select name="id" id="">
    <option value="">1</option>
    </select>
    <?php
echo $username;

    ?>
<input class="btn btn-primary" type="submit" name="submit" value="UPDATE">


</form>
</body>
</html>