I have a dropdown user list (which is generated by database info) and I'm looking for a way to load some extra information from the database every time I choose a different user from the dropdown menu. (without reloading the page)
<select class="form-control" id="Users" name="Users">
<option value="0" selected> - </option>
<?php
$query=$MMM->query("SELECT * FROM `users` WHERE user_status = 1 ORDER BY user_id ASC");
while ($data = $MMM->fetch($query)) {
?>
<option value="<?php echo $data['user_id']; ?>"> <?php echo $data['user_name']; ?> </option>
<?php
}
?>
</select>
And here is the table I'm trying to "reload" every time I chose a different user from the dropdown menu
<table class="table table-bordered table-striped table-xs">
<thead>
<tr>
<th class="text-center">Username</th>
<th class="text-center">Name</th>
<th class="text-center">Email</th>
<th class="text-center">City</th>
</tr>
</thead>
<tbody>
User Info will go here
</tbody>
</table>
Is it possible to do achieve this with PHP?