PHP javascript link id
<pre><code>&lt;?php
//connect to database .... 
//select query .... 
if(isset($_GET["link"])==false){
echo "sample 1"; 
}else{
echo "sample 2" ;
} 
?&gt;
&lt;script type="javascript"&gt;
function Link(id)
{

location.href='linktest.php&amp;link='+id;

}
&lt;/script&gt;
&lt;html&gt;
&lt;input type="button" value="link test" onclick="javascript: Link&lt;?php echo $row['id']; ?&gt;"&gt; 
&lt;/html&gt;
</code></pre>

<p>(assumed question) How do I force the onclick event to contain the value of $row['id']?</p>
