Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "db.php";
- include "functions.php";
- /* show errors in console */
- ini_set('display_errors', 1);
- ini_set('display_startup_errors', 1);
- error_reporting(E_ALL);
- // connection needs to be global
- global $connection;
- $query = "SELECT * FROM tl_users";
- // Performs a query on the database (connection, query)
- $result = mysqli_query($connection, $query);
- // error: , instead of &&
- if(isset($_POST['username'], $_POST['password']) ){
- $username = $_POST['username'];
- $password = $_POST['password'];
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Document</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
- </head>
- <body>
- <div class="container">
- <div class="col-sm-6">
- <form action="login_update.php" method="post">
- <div class="form-group">
- <label for="username">Username</label>
- <!-- display current username -->
- <input type="text" name="username" class="form-control" value="<?php echo $username;?>">
- </div>
- <!-- display current password (change password to text) -->
- <div class="form-group">
- <label for="password">Password</label>
- <input type="text" name="password" class="form-control" value="<?php echo $password;?>">
- </div>
- <!-- id field -->
- <div class="form-group">
- <select name="" id="">
- <?php
- showAllData();
- ?>
- </select>
- </div>
- <input class="btn btn-primary" type="submit" name="submit" value="Update">
- </form>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement