Jump to content

ScarfaceJM

New Members
  • Posts

    1
  • Joined

  • Last visited

ScarfaceJM's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.