Results 1 to 2 of 2

Thread: Dose anyone tell me what this mean...

  1. #1
    Join Date
    Aug 2006

    Dose anyone tell me what this mean...

    I'm trying to delete image from database using id number and image id number like "image_1, image_2 etc...

    There is button where to press button to send php to delete images

    <button class="test"> <a href='edit-product.php?yesdelete=$images_2'>delete</a></button>

    when i pressed button i'm getting error message said

    Warning: Cannot modify header information - headers already sent by (output started at C:\VertrigoServ\www\shopone\admin\data\products\edit-product.php:266) in C:\VertrigoServ\www\shopone\admin\data\products\edit-product.php on line 280

    That delete code is

    PHP Code:
    // Delete Item Question to Admin, and Delete Product if they choose

    if (isset($_GET['yesdelete'])) {
    // remove item from system and delete its picture
        // delete from database
    $id_to_delete $_GET['yesdelete'];
    $sql mysql_query("DELETE FROM product WHERE images_2='$id_to_delete' LIMIT 1") or die (mysql_error());
    // unlink the image from server
        // Remove The Pic -------------------------------------------
    $pictodelete = ("../product_images/$id_to_delete.jpg");
        if (
    file_exists($pictodelete)) {
    header("location: product-copy-4.php"); 

    The error line number 260 is where it said

    // delete from database

    and line number 280 is after end of ?> code.

    does anyone can help me what is mean and how to solve that please!


  2. #2
    Join Date
    Aug 2004
    It means something has already sent output to the browser before you got to your header() command, so you can no longer send HTTP headers. The error message say that output was generated at line 266.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center