Delete record works too well !

I've done this before successfully several times but now something strange is happening.  I've stared at this for a couple of hours now and don't see what I'm missing, it must be something blindingly obvious.
I created a page showing all records in a table using a repeating region. I added a column with a big red X image so that users can delete the record by clicking on the "X". This links to a delete page which displays the record and asks "Are you sure" the user clicks "Yes" and the record should be deleted.
What's happening is when the user clicks on the big red X the record is deleted and control is returned back to the page showing all records. I know it's going to the confirmation page as I tried removing the Delete Record behavior and it successfully displays the record I want to delete. I tried creating a new delete page from scratch to delete the record just in case there was something left over from the page I started with to create the delete page in the first place, same result.
Anyone have any clues? I'm using DW CS4, PHP, MySQL and Win 7
Thanks

oops sorry, here's the code for the delete page
<?php require_once('../Connections/adminconnection.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;   
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
if ((isset($_GET['reservationnumber'])) && ($_GET['reservationnumber'] != "")) {
  $deleteSQL = sprintf("DELETE FROM dinner WHERE reservationnumber=%s",
                       GetSQLValueString($_GET['reservationnumber'], "int"));
  mysql_select_db($database_adminconnection, $adminconnection);
  $Result1 = mysql_query($deleteSQL, $adminconnection) or die(mysql_error());
  $deleteGoTo = "admin2.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
    $deleteGoTo .= $_SERVER['QUERY_STRING'];
  header(sprintf("Location: %s", $deleteGoTo));
$colname_rsdeletedinntest = "-1";
if (isset($_GET['reservationnumber'])) {
  $colname_rsdeletedinntest = $_GET['reservationnumber'];
mysql_select_db($database_adminconnection, $adminconnection);
$query_rsdeletedinntest = sprintf("SELECT * FROM dinner WHERE reservationnumber = %s", GetSQLValueString($colname_rsdeletedinntest, "int"));
$rsdeletedinntest = mysql_query($query_rsdeletedinntest, $adminconnection) or die(mysql_error());
$row_rsdeletedinntest = mysql_fetch_assoc($rsdeletedinntest);
$totalRows_rsdeletedinntest = mysql_num_rows($rsdeletedinntest);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="../styles/thrColLiqHdr.css" rel="stylesheet" type="text/css" />
</head>
<body class="oneColFixCtrHdr">
<div id="container">
  <div id="header">
    <h1>Header</h1>
  <!-- end #header --></div>
  <div id="mainContent">
    <h1> Main Content </h1>
    <p>L</p>
    <p> </p>
    <table width="400" border="1">
      <tr>
        <td>res name</td>
        <td><?php echo $row_rsdeletedinntest['reservationname']; ?></td>
      </tr>
      <tr>
        <td>num in pty</td>
        <td><?php echo $row_rsdeletedinntest['numberinparty']; ?></td>
      </tr>
      <tr>
        <td>paid</td>
        <td><?php echo $row_rsdeletedinntest['amountpaid']; ?></td>
      </tr>
    </table>
    <p> </p>
    <p> </p>
    <form id="form1" name="form1" method="post" action="deletedinner.php">
      <label>are you sure
        <input type="submit" name="delete" id="delete" value="Submit" />
      </label>
    </form>
    <p> </p>
    <p>Donec nec libero.</p>
    <h2>H2 level heading </h2>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p>
<!-- end #mainContent --></div>
  <div id="footer">
    <p>Footer</p>
  <!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
<?php
mysql_free_result($rsdeletedinntest);
?>

Similar Messages

  • Its working too well

    i had no problems installing itunes 9. whatever, in fact, it works so well, that every shortcut on my computer now points to itunes. I can access nothing else. Every .lnk file on my computer is now an itunes shortcut.
    i've uninstalled it and reinstalled it a number of times, and always have the same trouble.
    any thoughts, anyone?

    i had no problems installing itunes 9. whatever, in fact, it works so well, that every shortcut on my computer now points to itunes. I can access nothing else. Every .lnk file on my computer is now an itunes shortcut.
    i've uninstalled it and reinstalled it a number of times, and always have the same trouble.
    any thoughts, anyone?

  • HT4528 Iphone 5 screen will not turn on, tried to restart but lock button doesnt work too well

    Iphone 5 screen wont turn on, tried restarting but lock button doesnt work too well

    Hi gavin149,
    If you are having issues with an iPhone that isn't responding, you may find the following article helpful:
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    Regards,
    - Brenden

  • 4.0 does not work too well...

    Since downloading 4.0, I've had lots of problems with page loading, Trackpad gestures, scrolling. having to click a new page to make it active, pointer does strange things on any page and a host of other minor but none the less irritating issues.
    I've had to revert back to 3.6.16 to get the browser to work again.
    Sorry but I've gone back to using Safari as my default browser until these issues with 4.0 can be resolved.

    Repeated clearing of the history and cache seems to have cleared up the problem. I still do not know why it reacted that way though.

  • WRT54GX2 Timed Access Restrictions work too well

    I have set three access restrictions applicable to both a laptop (ethernet and wireless MAC addresses) and a desktop.  They all work the first time; however, once they shut off internet access, they don't permit reconnection at the time they should.  The time functions all seem to be set correctly and working properly.  Is it possible that I am somehow "overloading" by having three separate MAC addresses for each access policy?  Should I limimt each policy to one MAC address?  Thanks.

    Yep, I have the same problem.  No answer yet on the thread I opened.  I have 2 policies with 2 MAC addresses from a wireless network listed.  It locks them at the right time, but when the morning comes, they remain locked.  It didn't work the first 2 days, then it worked for 2 days, then it failed this weekend again.  Just logging into the router doesn't solve it.  Either a reboot (pull the power cord and plug it back in) or a re-save of the config (without even making any changes) also makes access available again.
    It has to be a bug.  The config is pretty cut and dried.  Of course, it could be a clock problem if the router doesn't know what time it is!  Not sure exactly how to troubleshoot that one.  I've checked the logs, and they have the right time stamp in them, so I don't think this is what's happening.

  • My iPhone 3G doesn't turn on? The worst bit is that the menu button doesn't work too well either.... Help!

    I was charging it from 1300-2300 (10 hours) since the apple logo wasn't coming up but that lightning bolt sign appeared.
    When I came back, my phone just has a black screen and isn't turning on.
    The top menu button is practically useless and I've retries connecting it to iTunes but it doesn't even do that
    I've had this iPhone for more than 3 years and with time it's worn on and so the menu button has faltered and I dunno what to do.
    What can I do for it to turn on again??

    By "menu button" I mean Power button -'not the home button!

  • SMS+ call block works too well

    I'm having what appears to be the opposite problem as a lot of you with the SMS/call blocker - it's blocking 90% of my incoming calls and messages. These aren't hidden or anonymized senders; most of the time, they're in my contacts list. Lumia 822 Amber with the GDR 3 dev preview (which I fully understand may be the source of the problem).

    The only blocking software I have is what's built into WP8. I'm not a big apps guy.
    Email info removed as required by the Terms of Service.
    Message was edited by: Admin Moderator

  • Calls drop only in my apt have a wave band radio already no working too well very frustrating

    Have a iPhone 4s

    Talke to your phone carrier especially if your having cellular data issue in your apartment.

  • Adobe Fourms does not work with Opera too well

    Adobe Fourms does not work with Opera too well.  I have to use in Opera "Identify as Firefox just to post this message!
    I also have run into the same junk with Hotmail.
    Web Design Tip:  Always code for Opera and all other browsers will fall in line most of the time.

    dave milbut wrote:
    of course you're right east texas. hadn't noticed that. bad bad adobe. someone smack them with a rolled up news paper on the snout!
    I've installed a button in my Firefox tool bar to toggle iFrames on and off through a Firefox add-on called "Toolbar Buttons".
    The forum Reply Editor does not work when iFrames are blocked, so I need to toggle them back on when posting, then back off.  I imagine that's better than having them on all the time.
    Message was edited by: Ramón G Castañeda

  • I used All Recorder on Windows, exclusively to record streaming radio programs.  What would work similarly well on Mac?  Audacity?

         I used All Recorder on Windows, exclusively to record streaming radio programs.  What would work similarly well on Mac?  Audacity?

    You have various options, depending on your needs and the source you want to record, for instance,
    - Audio Hijack Pro (or its cheaper cousin Piezo);
    - WireTap;
    - iRecordMusic;
    In terms of free apps, you can try VLC (which won't work with certain streams, eg, BBC), iMagneto, or the audio editor Audacity in conjunction with a tool like Soundflower.
    You can probably find a few more options if you google it, but I'd say these are the main ones.

  • UC560 CUE not working--gives error "your recording is too short, record a longer message"

    I have a UC560 running Unity Express 8.0.3 that is having voicemail issues. After a CUE reload, if a call goes to voicemail the caller gets a message saying "your recording is too short, record a longer message"; at this moment, an error shows up in the CUE session saying "localhost postgres: voicemail aesop [local] idle in transaction:   CRASH sql sql sql PANIC:  failed to add item to the right sibling for "pg_largeobject_loid_pn_index".  After this error appears, any calls forwarded to voicemail just ring until they eventually disconnect.
    I have confirmed that we are not exceeding maximum storage.
    Is this a corrupt database? Would resetting the CUE to factory defaults help?

    Hi Mike,
    Was your issue solved? as I am facing same issue.
    Please share your solution with me.
    Thanks. 

  • Help with update,add, delete records

    Hi every one,
    This is a problems that I have been trying to figure out for
    a little while now and I hope you all can help me out. So this is
    the situation.
    I am useing CFX XLS 2 Query to create a query from an excel
    doc I have. Now my problem is how can I loop through and delete the
    records that no longer are in the spreadsheet?
    So in other words my client will be uploading a new XLS each
    day, this xls will have some new data, some of the same and some
    will be gone. So I need the system to check and see if the
    stocknumber is there, if it is it will just update that record, now
    if the record is new it will add the record but for the life of me
    I can't figure out how it can delete record.
    I had thought maybe doing a select where the stock numbers
    dont match but that didnt work out too well :)
    Thanks for any help you may be able to provide

    You could consider using ValueList() to create a list of
    stocknumbers from your excel query, then do something like this:
    <cfset sCurrentStockNumbers =
    ValueList(myQuery.stocknumber)>
    <cfquery name="removeStockNumbers"
    datasource="myDataSource">
    DELETE from myTable
    WHERE stocknumber NOT IN (<cfqueryparam
    value="#sCurrentStockNumbers#" list="Yes">)
    </cfquery>

  • How to delete records from MTL_SYSTEM_ITEMS table

    Hello Experts,
    BANNER
    =======
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    PL/SQL Release 8.1.7.4.0 - Production
    CORE     8.1.7.0.0     Production
    TNS for IBM/AIX RISC System/6000: Version 8.1.7.4.0 - Production
    NLSRTL Version 3.4.1.0.0 - Production
    I am working on Oracle Apps - 11.5.8 version.
    I have some doubts in deleting the records from MTL_SYSTEM_ITEMS table.
    There are few records which have junk characters and currently resides in table.
    I need to delete those records.
    But as per the approach; we should not delete any data directly from MTL table as it would cause huge impact.
    I have followed the below approach; but didnt worked out well.
    Script
    =======
    1)
    I have modified the below parameter in the MTL_SYSTEM_ITEMS_INTERFACE table --> SET_PROCESS_ID =0,TRANSACTION_TYPE ='DELETE',PROCESS_FLAG=1 .
    Apart from that; everything remains the same as in MTL_SYSTEM_ITEM table.
    2) Called the "Import Items" concurrent program.
    It got successfully completed. But record still exists in MTL_SYSTEM_ITEMS_INTERFACE table
    Your help is highly appreciated.
    Insert into MTL_SYSTEM_ITEMS_INTERFACE
       (SET_PROCESS_ID ,TRANSACTION_TYPE,PROCESS_FLAG ,INVENTORY_ITEM_ID, ORGANIZATION_ID, LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, LAST_UPDATE_LOGIN,
    SUMMARY_FLAG, ENABLED_FLAG, DESCRIPTION, BUYER_ID, SEGMENT1, ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE9, ATTRIBUTE15, PURCHASING_ITEM_FLAG, SHIPPABLE_ITEM_FLAG,
    CUSTOMER_ORDER_FLAG, INTERNAL_ORDER_FLAG, SERVICE_ITEM_FLAG, INVENTORY_ITEM_FLAG, ENG_ITEM_FLAG, INVENTORY_ASSET_FLAG, PURCHASING_ENABLED_FLAG,
    CUSTOMER_ORDER_ENABLED_FLAG, INTERNAL_ORDER_ENABLED_FLAG, SO_TRANSACTIONS_FLAG, MTL_TRANSACTIONS_ENABLED_FLAG, STOCK_ENABLED_FLAG, BOM_ENABLED_FLAG, BUILD_IN_WIP_FLAG,
    REVISION_QTY_CONTROL_CODE, CATALOG_STATUS_FLAG, RETURNABLE_FLAG, TAXABLE_FLAG, QTY_RCV_EXCEPTION_CODE, ALLOW_ITEM_DESC_UPDATE_FLAG, RECEIPT_REQUIRED_FLAG,
    RFQ_REQUIRED_FLAG, QTY_RCV_TOLERANCE, LIST_PRICE_PER_UNIT, PRICE_TOLERANCE_PERCENT, ENFORCE_SHIP_TO_LOCATION_CODE, ALLOW_SUBSTITUTE_RECEIPTS_FLAG,
    ALLOW_UNORDERED_RECEIPTS_FLAG, DAYS_EARLY_RECEIPT_ALLOWED, DAYS_LATE_RECEIPT_ALLOWED, RECEIPT_DAYS_EXCEPTION_CODE, RECEIVING_ROUTING_ID, LOT_CONTROL_CODE,
    SHELF_LIFE_CODE, SHELF_LIFE_DAYS, SERIAL_NUMBER_CONTROL_CODE, RESTRICT_SUBINVENTORIES_CODE, RESTRICT_LOCATORS_CODE, LOCATION_CONTROL_CODE, ACCEPTABLE_EARLY_DAYS,
    PLANNING_TIME_FENCE_CODE, LEAD_TIME_LOT_SIZE, ACCEPTABLE_RATE_INCREASE, ACCEPTABLE_RATE_DECREASE, PLANNING_TIME_FENCE_DAYS, END_ASSEMBLY_PEGGING_FLAG,
    REPETITIVE_PLANNING_FLAG, BOM_ITEM_TYPE, PICK_COMPONENTS_FLAG, REPLENISH_TO_ORDER_FLAG, ATP_COMPONENTS_FLAG, ATP_FLAG, WIP_SUPPLY_TYPE, PRIMARY_UOM_CODE,
    PRIMARY_UNIT_OF_MEASURE, ALLOWED_UNITS_LOOKUP_CODE, COST_OF_SALES_ACCOUNT, SALES_ACCOUNT, DEFAULT_INCLUDE_IN_ROLLUP_FLAG, INVENTORY_ITEM_STATUS_CODE,
    INVENTORY_PLANNING_CODE, PLANNING_MAKE_BUY_CODE, FIXED_LOT_MULTIPLIER, ROUNDING_CONTROL_TYPE, CARRYING_COST, POSTPROCESSING_LEAD_TIME, PREPROCESSING_LEAD_TIME,
    FULL_LEAD_TIME, MRP_SAFETY_STOCK_CODE, FIXED_DAYS_SUPPLY, RESERVABLE_TYPE, VENDOR_WARRANTY_FLAG, SERVICEABLE_COMPONENT_FLAG, SERVICEABLE_PRODUCT_FLAG,
    PREVENTIVE_MAINTENANCE_FLAG, PRORATE_SERVICE_FLAG, INVOICEABLE_ITEM_FLAG, INVOICE_ENABLED_FLAG, MUST_USE_APPROVED_VENDOR_FLAG, OUTSIDE_OPERATION_FLAG,
    COSTING_ENABLED_FLAG, AUTO_CREATED_CONFIG_FLAG, CYCLE_COUNT_ENABLED_FLAG, ITEM_TYPE, SHIP_MODEL_COMPLETE_FLAG, MRP_PLANNING_CODE, RETURN_INSPECTION_REQUIREMENT,
    EFFECTIVITY_CONTROL, CHECK_SHORTAGES_FLAG, EQUIPMENT_TYPE, WEB_STATUS, BULK_PICKED_FLAG, LOT_STATUS_ENABLED, SERIAL_STATUS_ENABLED, LOT_SPLIT_ENABLED,
    LOT_MERGE_ENABLED, DUAL_UOM_CONTROL, SERV_BILLING_ENABLED_FLAG, LOT_TRANSLATE_ENABLED, DEFAULT_SO_SOURCE_TYPE, CREATE_SUPPLY_FLAG)
    Values
       (0,'DELETE',1,464852, 102, TO_DATE('01/11/2007 16:15:11', 'MM/DD/YYYY HH24:MI:SS'), 3443, TO_DATE('08/24/2006 14:13:03', 'MM/DD/YYYY HH24:MI:SS'), 3443, 21069398,
    'N', 'Y', 'pentaseal 6 X 320 SL-807202 Klockner', 4223, '0006320161', 'No', 'No', 'MRPM', 'N', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y',
    'Y', 'Y', 1, 'N', 'Y', 'N', 'WARNING', 'Y', 'Y', 'N', 3, 0, 20, 'WARNING', 'Y', 'Y', 5, 5, 'WARNING', 3, 1, 2, 1825, 1, 2, 2, 2, 10, 4, 1, 0, 0, 1, 'B', 'N', 4, 'N',
    'N', 'N', 'N', 2, 'EA', 'EACH', 3, 12916, 14296, 'Y', 'Uncosted', 6, 1, 100, 1, 2, 0, 5, 50, 1, 20, 1, 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'Y',
    'CMPC', 'N', 3, 2, 1, 'N', 2, 'UNPUBLISHED', 'N', 'N', 'N', 'N', 'N', 1, 'N', 'N', 'INTERNAL', 'Y');---------

    Hi,
    You have to use the delete item utility of Oracle Inventory.
    Responsibility: Inventory Superuser or similar
    Navigation: Items -> Delete Items
    Enter a meaningful name in the Group field.
    Type - Item
    Select the organization you want to delete the item from.
    In the details section, enter the items you want to delete.
    Once all the items entered, click on the "Chcek Group" button. This will validate whether the items you have entered are eligible to delete (i.e. whether any child record such as transactions exist).
    It will submit a concurrent program and once the program finishes you will be able to see the result in the Results tab.
    Finally click on the "Delete Group" button to delete the eligible items.
    Thanks,
    PS.

  • I've recently formatted my 10.7.4 mountain lion MacBook from 2007. The hard drive is wiped and I think it deleted to OS too. How do I put the OS back on it?

    I've recently formatted my 10.7.4 mountain lion MacBook from 2007. The hard drive is wiped and I think it deleted to OS too. How do I put the OS back on it?

    Wiping the drive does indeed delete the OS. Try this -
    Boot to the Lion (10.7.4 is Lion not Mountain Lion) recovery partition by restarting the computer and holding down the command and R keys during startup.
    If this works, reinstall from here. You must be connected to the Internet to do this.
    If this does not work, possibly because you reformatted the recovery partition as well, you will need to reinstall from your original disks (assuming it came with 10.6 or earlier.) Boot to the disk by holding down the C key during startup and run the installer.
    Best of luck.

  • PHP Delete Record Issue

    I've set up a simple database for adding event news to a
    site. I'm pretty new to PHP, but I have the Insert, Update, and
    Display pages working properly. However the Delete Record page is
    being a big pain. I have it set up just as it explains in
    Dreamweaver Help, as well as a tutorial i am using as a backbone
    for this project. Its a form with a hidden filed that is
    dynamically pulling my ID. I have the Delete behavior pointing at
    the same ID and record set.
    My Delete link is properly setting up a dynamic page with the
    title of record to be deleted showing up just fine. Also, the
    redirect page is correct after hitting the Delete button. Which
    makes me believe the issue is happening in somewhere in the
    behavior. None of my records are being deleted when I go back to
    the Display page. They are still there. Im pointing the behavior at
    my Primary record so im not sure what's going on. I'm a first-timer
    to this. Any help would be much appreciated.
    Here is my code:

    Hi
    I was reading your post and realized that I had the same
    troubles the first time I tried to setup a record deletion page.
    I hope the following helps.
    What I ended up doing was to set up 3 pages..
    1) a user list page of all users in the users table
    2) a confirmation page to show user info
    3) a delete page which does the actual deletion
    This first page was a simple repeat region table showing the
    entire list of users in the database table. I linked the username
    to the conformation page with a simple URL Parameter to isolate the
    user I want to delete
    Here is the code
    <a href="admin_users_delconfirm.php?id=<?php echo
    $row_rsUsers['id']; ?>
    The on the confirmation page I have a delete button graphic
    which is linked to the delete page in the same way.
    Code:
    <a href="admin_users_delete.php?id=<?php echo
    $row_rsUsers['id']; ?>
    Finally on the delete page I applied the" delete record"
    server behaiviour so that the deletion is done when the page loads.
    You can also have it redirect back to the master list of users when
    the deletion is done.
    It may seem a little redundant to have 3 pages, but the
    purpose of the 2nd page is to give the user an opportunity to
    change their mind and also to remind them that the delete action
    cannot be undone.
    I hope this helps you.
    Good Luck and Good Coding!

Maybe you are looking for