here is my code My goal is to be able to fetch data from the database and place it in a text box so the user can update their profile. I have not gotten to the update function yet. Right now i am trying to figure out how to get the data to show in the text box
<?php
$userID = htmlspecialchars($_GET["userID"]);
$lastName = htmlspecialchars($_GET["lastName"]);
$_SESSION["userID"] = $userID;
include 'inc/connect.php';
$query = "SELECT * FROM USERS WHERE userID = '$userID'";
$result = mysqli_query($link, $query) or die(mysql_errno());
$row = mysqli_fetch_assoc($result);
?>
<div class="container">
<h1> <?php if(isset($_SESSION['username'])) {
echo $_SESSION['username'];
echo "'s Profile";
} ?>
</h1>
<form class="form-horizontal" action="func/func_user_profile.php" method="post">
<div class="form-group">
<label class="control-label col-sm-2"> Email:</label>
<div class="col-sm-10">
<input type="email" class="form-control" name="email" value="<?php echo $row["email"];?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"> Password:</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="password" value="<?php echo $row["password"];?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"> Current monthly expenses:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="monthlyExpenses" value="<?php echo $row["monthlyExpenses"];?>">
</div>
</div>
<div class="form-group" id="submit">
<input type="submit" class="btn btn-success" value="Update Profile" >
<input type="button" class="btn btn-danger" onClick="window.location.replace('welcome.php')" value="cancel">
</div>
</form>
</div>
<?php
include 'inc/footer.php';
?>
</body>
</html>