Jump to content

joaomagico

New Members
  • Posts

    3
  • Joined

  • Last visited

joaomagico's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yes that is my problem how I associate the image with the row I want to delete ?
  2. my images came from here $frontpage_url."/images/" I have try like this but still don't work
  3. I have a <a>, on click delete a product from database that is on server, I want to delete the product and the same time delete the image of that product. I using unlink() my code delete the product but don't delete the image and I don't no why someone can tell me what is missing ? if((isset($_GET["remove"])) && ($_GET["remove"] != "")){ $idproduct = $_GET["remove"]; $sql ="DELETE FROM product WHERE idproduct = '".$idproduct."'"; if(mysqli_query($connect, $sql) or die ("Erro")){ //the part that don't work $file = $frontpage_url."/images/".$_FILES["imagem"]["name"]; unlink($file); echo "success"; } }
×
×
  • 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.