How to show contact details while clicking the particular name from <li>
list
Contact_list.php:
<?php
$con=mysqli_connect("localhost","user","pass","nilambu1_mydb");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM n_info ");
while($row = mysqli_fetch_array($result)) {
echo "<li><a href='contact.php' data-transition='slidedown'> <img src='images/calling.png'/> <h2> " . $row['first_name'] . " " . $row['last_name'] . "</h2> <p >Mobile : " . $row['mobile1'] . " , " . $row['mobile2'] . "</p></a></li>";
}
mysqli_close($con);
?>
viewcontact.php:
I have contact book in my SQL database. After my basic coding I got contact name via <li>
list.
My html output:
<ul>
<li>Faisal</li>
<li>Jovesh</li>
<li>Arsal</li>
</ul>
So next step, While clicking this name I want show full contact details in my second page
My SQL database table name is "n_info"
My SQL database table columns are 'id', 'first_name', 'last_name', 'mobile1', 'mobile2', 'land_line' and 'address'.