Hi i am Trying to delete a page from my site cms
and something is not working .
the code is:
<?php
$con = mysql_connect("localhost","matanc_cmd","123123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("matanc_cms", $con);
$id = (int) $_POST['id'];
mysql_query("DELETE FROM content WHERE id='$id'");
mysql_close($con);
// if successfully updated.
if($result){
echo "Successful";
echo "<BR>";
echo "<a href='show.php'>View result</a>";
}
?>
What is wrong ?
when i want to delete a page i go to the delete.php?id=XX (XX = ID of the page)