Jump to content

[SOLVED] PHP remove rows from database


daveoffy

Recommended Posts

I have this

$memberid = $_SESSION['SESS_MEMBER_ID'];
$friendid = $_GET['FRIEND_ID'];
$sql = "DELETE FROM friends WHERE member_id = '$memberid' AND friend_id = '$friendid'";
$result = mysql_query ($sql);
if ($result) {
	Header('Location: friend-remove-success.php');
	}else{
echo "Query Failed";}

It goes to the header location but it doesn't delete the row where memberid and friend id are the same.

Link to comment
https://forums.phpfreaks.com/topic/136828-solved-php-remove-rows-from-database/
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.