Below is the php code I'm using to populate a select dropdown with the variable "full_name".
$sql = "SELECT * FROM Entries";
$result = mysql_query($sql);
echo "";
I would like to be able to select a name from the dropdown list and display all the relevant data for that specific row so it can be easily seen by the admins.
Basically
select name (details populate below)
Name: $full_name
DOB: $dob
Work Phone: $work_phone
etc...
Maybe something like this?
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "Name :{$row['full_name']}
".
"DOB : {$row['dob']}
".
"Work Phone : {$row['work_phone']}
".
"--------------------------------
";
}
echo "Fetched data successfully\n";
I just don't know how to tie the dropdown selection to correctly display the information for that person's name. Any help is appreciated!
Thanks
Untitled Document
';
echo $info; /* DISPLAY THE INFOs, BUT NOT REALLY BECAUSE THEY ARE HIDDEN */
?>
id
requested_action
full_name
birth_date
sex
work_location
work_phone
hire_date
coverage_choice
network_choice
plan_choice
dependant_name_1
dependant_relationship_1
dependant_dob_1
dependant_sex_1
dependant_name_2
dependant_relationship_2
dependant_dob_2
dependant_sex_2
dependant_name_3
dependant_relationship_3
dependant_dob_3
dependant_sex_3
dependant_name_4
dependant_relationship_4
dependant_dob_4
dependant_sex_4
spouse_coverage
employee_enroll
signature
date_today
reg_date