$qaas= $DB_site->query("SELECT attachment.attachmentid,attachment.filename AS filename,post.postid FROM attachment,post,thread WHERE attachment.visible=0 AND attachment.attachmentid=post.attachmentid AND post.threadid=thread.threadid"); while($qaasg=$DB_site->fetch_array($qaas)) { if($bbuserinfo[usergroupid]==6) { $qaasshow="<td bgcolor='$post[backcolor]' colspan='2' align='left' valign='bottom'>The file:$qassg[filename] what posted by $posts[postusername].<br>To view this file go <a href='attachment.php?attachmentid=$qaasg[attachmentid]'>here</a><br><form action='qaasupdate.php' method='get'><input type='hidden' name='qaaspID' value='$qaasg[postid]'><input type='hidden' name='attachid' value='$qaasg[attachmentid]' size='10'><input type='radio' name='qaas' value='1'>Approve <input type='radio' name='qaas' value='2'>Disapprove <input type='radio' name='qaas' value='3'>Delete<br><input type='submit' value='Update Attachment'></form></td>"; } else { $qaasshow=""; } }