Hi all,
I am trying to get data from MySQL to display in a html table in TCPDF but it is only displaying the ID.
$accom = '<h3>Accommodation:</h3>
<table cellpadding="1" cellspacing="1" border="1" style="text-align:center;">
<tr>
<th><strong>Organisation</strong></th>
<th><strong>Contact</strong></th>
<th><strong>Phone</strong></th>
</tr>
<tbody>
<tr>'.
$id = $_GET['id'];
$location = $row['location'];
$sql = "SELECT * FROM tours WHERE id = $id";
$result = $con->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
'<td>'.$location.'</td>
<td>David</td>
<td>0412345678</td>
</tbody>';
}
}
'</tr>
</table>';
Anyone got any ideas?