I have written the following code to generate information from an SQL database:
<?php
$search1 = "SELECT Name FROM users";
if($mysqli->query($search1) == TRUE)
{
echo "You have successfully searched the request";
}
$result = $mysqli->query("SELECT Name FROM users");
echo '<table border=1px>';
echo'<th>Name</th>';
echo $row;
while($row=$result->fetch_array(MYSQLI_ASSOC))
{
echo'<tr>'; // printing table row
echo '<td>'.$row['Name'].'</td>';
echo'</tr>';
}
echo '</table>';
?>
This generates a list of names in the table. There are other columns in the table such as Country, Email, Hobby and Date Signed up. All of which are VARCHAR except the last which is of type DATE. I am trying to figure out code so that when I click on one of the generated names, the rest of the information (Country, Email etc,) is shown.