<?php>
while($row = mysql_fetch_array($result2))
{
echo "<tr>";
echo "<td>" . $row['IDNO'] . "</td>";
echo "<td>" . $row['ADDRESS'] . "</td>";
echo "<td>" . $row['LASTNAME'] . "</td>";
echo "<td>" . $row['FIRSTNAME'] . "</td>";
echo "<td>" . <a href='update.php'>view</a> . "</td>";
echo "</tr>";
}
echo "</table>";
}
?>
That’s my code, I really don’t know the correct format of putting links inside the php tags:
echo "<td>" . <a href='update.php'>view</a> . "</td>";
Please help
PHP is a templating language, there’s no need to be throwing HTML around in strings.
Note the use of HTML-escaping. Without this,
<and&characters in your strings will be copied into the raw HTML, causing potential cross-site scripting security problems. Whether using PHP templating or sticking strings together, always HTML-escape plain text output.