title: Applying a view link
body: <p>I am using the following Code, to get data from the Database in phpmyadmin, and showing it in a html table. In the message column i have put a view link, to show the complete message when clicked. I have truncated the message successfully. Now that the View Link's onclick event is not working. Please see if i am doing sth wrong.:</p>
  
  <pre><code>    &lt;?php $i=0;?&gt;
     &lt;table border="1" style="position:absolute; left: 197px; top: 50px;"&gt;
     &lt;tr&gt;
    &lt;td width="236" style="font-family:Ravie; color:#313253; text-align:center"&gt;Name&lt;/td&gt;
    &lt;td width="225" style="font-family:Ravie; color:#313253; text-align:center"&gt;
     Email Address&lt;/td&gt;
    &lt;td width="267" style="font-family:Ravie; color:#313253; 
    text-align:center"&gt;Message&lt;/td&gt;
    &lt;/tr&gt;
    &lt;?php
    $i=0;
    while ($i &lt; $num) {
  
    $f1=mysql_result($result,$i,"FullName");
    $f2=mysql_result($result,$i,"EmailAddr");
    $string=mysql_result($result,$i,"Message");
    $limit=10;
    $string1 = myTruncate($string,$limit);
  
    ?&gt;
  
    &lt;tr&gt;
    &lt;td&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;?php echo $f1; ?&gt;&lt;/font&gt;&lt;/td&gt;
    &lt;td&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;?php echo $f2; ?&gt;&lt;/font&gt;&lt;/td&gt;
    &lt;td&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;?php echo $string1; ?&gt;&lt;/font&gt;
    &lt;a href="" onclick="&lt;?php echo $string; ?&gt;"&gt;View&lt;/a&gt;&lt;/td&gt;
  
     &lt;/tr&gt;
  
     &lt;?php
     $i++;
     }
    ?&gt;
   &lt;/table&gt;
  </code></pre>