我在showphoto.php页取得图片id,想把它传给comment.php,把每个评论内容和图片的id对应起来,我在下面这样写不对,要怎么修改??求帮忙
$query=mysql_query("select * from tb_tpsc where type='达人收藏' order by id desc limit ".($page_num-1)*$row_per_page." ,$row_per_page",$conn);
while($row=mysql_fetch_array($query))  
  {
 echo"<a href=commentadd.php?id=".$row[id]."></a>";
 
  }  
这个是评论页处理表单的代码 ,ID没有传过来,要怎么传递
if($_POST["submit"]=="提交"){
  $tpid=$_GET[id];
$content=$_POST[txt_content];
$datetime=date("Y-m-d H:i:s");
$INS="Insert Into tb_comment (tpid,content,datetime) Values ('$tpid','$content','$datetime')";
$info=mysql_query($INS);