Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getUserlist() {
- $stmt = $this->pdo->query('SELECT last_name FROM network_user Order by last_name');
- $userlist = [];
- while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
- $userlist[] = ['last_name' => $row['last_name']];
- }
- return $userlist;
- }
- <select name="formResident">
- <option>Select User</option>
- <?php
- while ($row = $userlist) {
- echo '<option value="'.htmlspecialchars($row['last_name']).'"> </option>';
- }
- ?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement