About 1,230,000 results
Open links in new tab
  1. How to delete an image using PHP & MySQL? - Stack Overflow

    Apr 16, 2010 · Delete the file: unlink("thumbs/imagename"); unlink("images/imagename"); Remove from database $sql="DELETE FROM tablename WHERE name='imagename'" $result=mysql_query($sql); Assuming name is the the name of the field in the database holding the image name, and imagename is the image's name. All together in code:

  2. delete image from folder PHP - Stack Overflow

    $dirs = array_filter(glob('*'), 'is_dir'); foreach ($dirs as $directory) { $images = glob($directory . "/*.png"); foreach ($images as $image) { echo "DELETING: " . $image . "<br>"; unlink($image); } }

  3. How to upload image, display, edit and delete in PHP? - Techno …

    In this tutorial, you will learn how to upload, display, edit and delete image using PHP and MYSQL database. This is a CRUD application with the image in PHP with MySQL database.

  4. PHP/MySQL Delete image from database - Stack Overflow

    Sep 22, 2010 · $sql = "DELETE FROM isgallery WHERE id = ".mysql_real_escape_string($_POST['isgallery_id']); Notes: For deleting the file, the file name should be stored in the isgallery table.

  5. Upload Display and delete images from the server and the database using PHP

    Feb 23, 2024 · In this tutorial you'll learn how to upload images to the server, store their information in a database, retrieve and display them on a web page, and finally, how to implement functionality to delete images when necessary. The image below illustrates the layout of the application you'll be building in this tutorial.

  6. Add, Edit, Delete Image with data table using PDO in PHP/MySQL

    May 19, 2016 · A step-by-step tutorial with snippets on how to add, edit, and an Image with a data table using PHP PDO Approach for Beginners.

  7. Multiple Image Upload with View, Edit and Delete in PHP

    May 30, 2019 · In this tutorial, we will show you how to upload multiple images and manage (view, edit, and delete) data with PHP and MySQL. In the example script, we will implement a gallery management system with multiple images using PHP and MySQL.

  8. PHP Deleting Image In MySQL | SourceCodester

    May 16, 2016 · In this tutorial, we are going to discuss PHP Deleting Image In MySQL. We're gonna use Delete Statement to delete an image from our database table. This will be easy if you read or follow our previous tutorial in PHP Insert Image In MySQL. "tbl_image" Example Database Table. Our Data Deleting Image In MySQL Using PDO Deleting image in our "tbl ...

  9. Upload, Insert, Update, Delete an Image using PHP MySQL

    Feb 25, 2016 · if (isset ($_GET ['delete_id'])) {// select image from db to delete $stmt_select = $DB_con-> prepare ('SELECT userPic FROM tbl_users WHERE userID =:uid'); $stmt_select-> execute (array (':uid' = > $_GET ['delete_id'])); $imgRow = $stmt_select-> fetch (PDO:: FETCH_ASSOC); unlink ("user_images/". $imgRow ['userPic']); // it will delete an actual ...

  10. Delete Image From Folder In PHP - TalkersCode.com

    Mar 11, 2024 · In this tutorial we will show you the solution of delete image from folder in PHP, as, with help of form when we get the image from user to save it in database, we also save the copy of uploaded file in a folder that is in our local computer or server also.

Refresh