= 'SELECT * from newsmanagement order by dt desc'=mysql_query($sql)=mysql_fetch_assoc($ret))
<frame id="frame <?php echo $a; ?>">
<form action="postcomment.php?bid=<?php echo $a[newsid]; ?>& txt=tid<?php echo $a[newsid]; ?>" method="post" onsubmit="return validate(this)" enctype="multipart/form-data">
<table class="news-content" border="0" cellspacing="2" cellpadding="0">
<tr class="headline">
<th>
</th>
</tr>
<tr class="summary">
<td>
</td>
</tr>
<tr class="postedby">
<td style="text-align:right" height="auto">
<b>Posted By:</b>
</td>
</tr>
= "select comments from newscomments where newsid='$a[newsid]' and approved ='Activate'"=mysql_query($sql_inner)=mysql_fetch_assoc($ret_inner))
<tr class="comment">
<td style="text-align:left" height="auto">
<b>Comments:</b>
<br>
</td>
</tr>
<tr>
<td><div><b>Post Comments</b></div>
<textarea style="width:70%; " id="tid<?php echo $a[newsid] ?>" name="tid<?php echo $a[newsid] ?>" rows="1" ></textarea>
<div><input class="btn" type="submit" id="<?php echo $a[newsid] ?>" name="Comments" value="Comments" ></div>
</td>
</tr>
</table>
<div class="seperator"></div>
</form>
</frame>
// to get value
$newsid= $_GET['bid'];
$comment= $_GET['txt'];
if($_POST[$comment] !='')
{
$query = "insert into newscomments(dt,comments,newsid) values(SYSDATE(),'$_POST[$comment]',$newsid)";
if(mysql_query($query))
{
?>
<script language="javascript" type="text/javascript">
alert("You have successfully submitted the comments");
location.href = "home.php";
</script>
<script language="javascript" type="text/javascript">
alert("Error on submit comment..!");
location.href = "home.php";
</script>