Jump to content

[SOLVED] ask before deleting post from database


Darkwoods

Recommended Posts

im trying to make a delete page but i want a code that ask the user if he/she are sure about deleting it.. if yes it will delete if no it wont!

 

can anybody give any hint on where to start or help me doing it?

 

here is the code i got a very simple and basic one...

<?php
include "inc/header.php";
        $id = $_GET['id'];
        $result = mysql_query("DELETE FROM news WHERE id='$id' ",$connect);

                     echo "<b>Deleted!";
                     //header("location: index.php");
                    // echo "<meta http-equiv=Refresh content=1;url=index.php>";

include "inc/footer.php";
?>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.