<?
session_start();

include "../config.php";
include "../header.php";
include "../style.php";


$id = dbput($_POST['id']);

if( isset($_SESSION["ulogin"]) )

   	{  // members only stuff!

		include("navigation.php");
        include("../banners.php");
        echo "<font size=2 face='$fonttype' color='$fontcolour'><p><center>";
		
		
	$query1 = "delete from headlineads where id='".$id."' and userid='$userid'";
	$result1 = mysql_query ($query1)
	     or die ("Delete from 'headlineads' failed");
		 
		 
	mysql_query("DELETE FROM headlineads_clicks WHERE blid='".$id."'");	 	 
		 
  ?>      
<p><center>The Headline Ad has been deleted. <a href="advertise.php">Click here</a> to go back.</center></p>
<?
		
		
        echo "</font></td></tr></table>";
    }
else
  { ?>

  <p><center>You must be logged in to access this site. Please <a href="../index.php">click here</a> to login.</center></p>

  <? }

include "../footer.php";
mysql_close($dblink);

?>