What's up guys! New to the forum sorry my first post is asking for help, but here's what I got. I have a database setup as follows:
id = 1
Name = sample
Level = 99
Status = sampleStatus
Updated = dateLastUpdated
I have a page setup that gets users from the database and puts them into a drop down list. Just the names not the enter info.
<?php
require 'connect.php';
$database = 'member_list';
mysql_select_db($database) or die("Could not connect to database: ".mysql_error());
$query = "SELECT id, Name FROM members ORDER BY Name ASC";
$query_result = mysql_query($query) or die("Query failed".mysql_error());
while($row = mysql_fetch_array($query_result)) {
$id = $row['id'];
$name = $row['Name'];
echo "<option value=\"$id\">
$name
</option>";
}
?>
Now what I would like to do, is have it setup where when I click on a name from this menu, it will populate a table with all the users information. So if I click on Todd his info will populate a table. Then when I click on another name in the list, Todds info will erase and Tom's info will now populate the table. I don't know if it can be done with php as I'm fairly new and still learning.