www.webdeveloper.com
Results 1 to 2 of 2

Thread: PHP Delete from SQL not working in IE11, works in every other browser

Hybrid View

  1. #1
    Join Date
    Nov 2013
    Posts
    4

    PHP Delete from SQL not working in IE11, works in every other browser

    This one has me stumped.

    I have a super simple PHP delete script:

    PHP Code:
    <?php
    require("../content/common.php");

    if (isset(
    $_GET['id'])) {
        
    $id $_GET['id'];
    }
    else {
        
    $id null;
    }

    $query_params = array(
        
    ':user_id' => $id,  
    );

    $query 
        DELETE FROM users 
        WHERE 
            ID = :user_id 
        "
    ;

    $stmt $db->prepare($query); 
    $result $stmt->execute($query_params); 
    header("Location: ../index.php?p=admins&msg=success");
    die(
    "Delete successful");
    ?>
    After hitting submit in IE11, the browser tab starts loading and never stops, as if it's stuck in some kind of loop. Chrome works flawlessly.

    Any ideas?

  2. #2
    Join Date
    Nov 2013
    Posts
    4
    So for some reason IE11 did not like this in my delete form:

    PHP Code:
    <form action="scripts/sc-delete-user.php?&id=<?php echo $id?>" method="post" autocomplete="off">
    I managed to workaround it by removing the form and using a button:

    PHP Code:
    <input type='button' value='CONFIRM DELETE' onclick="location.href='scripts/sc-delete-user.php?&id=<?php echo $id?>';" class="button-link">
    No idea why this became a problem after upgrading from IE10 to IE11.

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



Recent Articles