How to write a link within a php/html form
<p>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.</p>

<p>the link is:</p>

<pre><code>&lt;a href="javascript:void(0);" onclick='$.get("do.php",{ cmd: "ban", id: "&lt;?php echo $rrows['id']; ?&gt;" } ,function(data){ $("#ban&lt;?php echo $rrows['id']; ?&gt;").html(data); });'&gt;Ban&lt;/a&gt;
</code></pre>

<p>And this is the section where i want the link placed, marked my_link:</p>

<pre><code>$result = mysql_query("SELECT * FROM logg WHERE UserGroup='".$_SESSION['user_group']."'     AND CompletedEvent='0'  ORDER BY RegDate DESC");

echo "&lt;table border='1'&gt;
&lt;tr&gt;
&lt;th&gt;RegDate&lt;/th&gt;
&lt;th&gt;RegByUser&lt;/th&gt;
&lt;th&gt;Event&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;";

while($row = mysql_fetch_array($result))
  {
  echo "&lt;tr&gt;";
  echo "&lt;td&gt;" . $row['RegDate'] . "&lt;/td&gt;";
  echo "&lt;td&gt;" . $row['RegByUser'] . "&lt;/td&gt;";
  echo "&lt;td&gt;" . $row['Event'] . "&lt;/td&gt;";
  echo "&lt;td&gt;" my_link "&lt;/td&gt;";
  echo "&lt;/tr&gt;";
  }
echo "&lt;/table&gt;";

mysql_close($con);
</code></pre>

<p>I hope someone can show the the right way to write this link.</p>
