Trying to redirect from inside an iframe ... that's the code:
<?php
include'file_constants.php';
$imgid = $_GET['id'];
$con = mysql_connect($host, $user, $pass) or die("Can not connect to database: ".mysql_error());
mysql_select_db($db_name) or die("Can not select the database: ".mysql_error());
$sql = mysql_query("SELECT * FROM comments WHERE ImageID = '$imgid' ORDER BY Date DESC");
while($comment = mysql_fetch_array($sql))
{
echo "Comment ID - ",$comment['CommentID'];
?><br/><br/><?php ;
echo $comment['Comment'];
?><p/><p/><br/>
<?php
echo $comment['Date'];?> <?php
echo $comment['ComUserID'];
?>
<form action="deletecomment.php" target="_top" method="post" >
<input type="radio" name="del" />
<input type="hidden" name="imageid" value="<?=$comment['CommentID']?>" />
<input type="submit" style="font-weight: bold;height: 25px; width:130;" value="Delete Comment" />
</form>
<p/><p/>--------------------------------------------------------------------------------------------------------------<p/><?php
}
mysql_close($con);
?>
and thats what im getting(it opens in a separate wndow) :
Notice: Undefined index: id in P:\xampp\htdocs\admincomments.php on line 3
it suppose to redirect to another page which basically is :
`
$echo "deleting";
`