Jump to content

HalRau

New Members
  • Posts

    2
  • Joined

  • Last visited

HalRau's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. HalRau

    Delete record Error

    Thank you. There was some white space, (line breaks) at the end, before the ?> end. None at the beginning but I had added some security code at the top of the page and that may have eliminated it. Thanks again for your help and a great set of scripts.
  2. HalRau

    Delete record Error

    First of all thank you for writing this script and putting it on the Internet. I have modified the Add, Edit and Delete script to my database. Everything works fine except the delete page. Here is the code I have on that page: <?php /* DELETE.PHP Deletes a specific entry from the 'directemail' table */ // connect to the database include('connect-db.php'); // check if the 'id' variable is set in URL, and check that it is valid if (isset($_GET['Rec_ID']) && is_numeric($_GET['Rec_ID'])) { // get id value $Rec_ID = $_GET['Rec_ID']; // delete the entry $result = mysql_query("DELETE FROM directemail WHERE Rec_ID=$Rec_ID") or die(mysql_error()); // redirect back to the view page header("Location: CNTCAdmin.php"); } else // if id isn't set, or isn't valid, redirect back to view page { header("Location: CNTCAdmin.php"); } ?> The error message reads: "Warning: Cannot modify header information - headers already sent by (output started at /home/heartl20/public_html/admin/CNTCAdmin-delete.php:2) in /home/heartl20/public_html/admin/CNTCAdmin-delete.php on line 22" NOTE: It does delete the record. It just doesn't go back to the CNTCAdmin.php page which is my "View" page. Any help would be most appreciated. Thanks, Hal
×
×
  • Create New...