Jump to content

delete.php and linking


illuz1on

Recommended Posts

<?php

 

require_once("db.php");

 

$sql = "DELETE FROM news WHERE id='$id'";

mysql_query($sql);

echo "Success!!";

 

?>

 

Hey, that is my delete.php file. This is the link I use to try make it delete..

 

<a href=\"delete.php?id=$id\">Delete</a>

 

It says "Success!!" but then doesnt remove anything from the database?

 

Can anyone help me try see why it doesnt? :)

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/47145-deletephp-and-linking/
Share on other sites

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.