I want to input som text to generate an update link in a form field, but since the fields are populated from a sql database and is within php section of the code i need help to figure out how to write the link correctly.
the link is:
<a href="javascript:void(0);" onclick='$.get("do.php",{ cmd: "ban", id: "<?php echo $rrows['id']; ?>" } ,function(data){ $("#ban<?php echo $rrows['id']; ?>").html(data); });'>Ban</a>
And this is the section where i want the link placed, marked my_link:
$result = mysql_query("SELECT * FROM logg WHERE UserGroup='".$_SESSION['user_group']."' AND CompletedEvent='0' ORDER BY RegDate DESC");
echo "<table border='1'>
<tr>
<th>RegDate</th>
<th>RegByUser</th>
<th>Event</th>
<th>Status</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['RegDate'] . "</td>";
echo "<td>" . $row['RegByUser'] . "</td>";
echo "<td>" . $row['Event'] . "</td>";
echo "<td>" my_link "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
I hope someone can show the the right way to write this link.