In my product.php I give the user the opportunity to add or remove a deal in his wishlist.
I did it using AJAX and an external file that added his id and product id but I don’t want it with AJAX.
What is another way to run this SQL query in PHP when a button or a link or image is clicked? I don’t mind if the page is refreshed.
$query = "DELETE FROM relations WHERE user_id = '$myid' and deal_id = '$dealid'";
mysql_query($query);
mysql_close();
With a simple link?
delete.php would look like something this: