<div class="col-md-6">
<?php
include 'includes/connection.php';
$query = "SELECT * FROM customer";
$result = mysql_query($query);
while ($person = mysql_fetch_array($result)) {
//echo "<p>" . $person['customerID'] . "</p>";
//echo "<p>" . $person['firstName'] . "</p>";
//echo "<p>" . $person['lastName'] . "</p>";
//echo "<p>" . $person['address'] . "</p>";
$customerID = $person['customerID'];
$firstName = $person['firstName'];
$lastName = $person['lastName'];
$address = $person['address'];
echo $customerID; //A test echo that is working just fine. But i need to echo this to the table
}
?>
<table class="table table-striped">
<tr>
<th>Customer ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Address</th>
</tr>
</th>
<tr>
<td>
<? echo $customerID; ?>
</td>
<td>
<? echo $firstName; ?>
</td>
<td>
<? echo $lastName; ?>
</td>
<td>
<? echo $address; ?>
</td>
</tr>
</table>
</div>
</div>
I am learning PHP and i need help with this as soon as possible.
When i run the web page nothing is being shown to the table apart from the table headers. Please help for i am learning PHP. I am using xampp on which i created a database.