My table gets populated from my phpmyadmin database in php:
while($row2 = mysqli_fetch_array($result2))
{
$dataRow2 = $dataRow2."
<tr>
<th>Event Name</th>
<th>$row2[1]</th>
<th>Location</th>
<th>$row2[2]</th>
<th>Description</th>
<th>$row2[3]</th>
<th>Date</th>
<th>$row2[4]</th>
<th>Cost</th>
<th>$row2[5]</th>
<th>Email</th>
<th>$row2[6]</th>
</tr>";
}
And is in the HTML as so:
<table>
<?php echo $dataRow2;?>
</table>
I want to make the last th (the email address) clickable, opening a sendto for the user to email the address. How is this achievable?
2
Answers
Assuming the email is
$row2[6]
, you would want to replace it withThis will change it to a link with the email address still visible in the table.
You can use anchor tag mailto to clickable like the following