Results 1 to 2 of 2

Thread: multiple submit

  1. #1
    Join Date
    Jul 2007
    Posts
    59
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default multiple submit

    i have
    <input type="submit" name="Delete" id="Delete" value="Delete">
    <input type="submit" name="disable" id="disable" value="disable">
    <input type="submit" name="enable" id="enable" value="enable">

    how can i check the value when it action $_post abd $_get doesn't work

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Code:
    <?php
     if (isset($_POST['Delete']) && $_POST['Delete'] != '') {
       //delete function
     }
     elseif (isset($_POST['disable'] && $_POST['disable'] != '') {
      //disable function
     }
     elseif (isset($_POST['enable'] && $_POST['enable'] != '') {
      //enable function
     }
     else {
       //default action
     }
    ?>
    Hope this helps
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. The Following User Says Thank You to thetestingsite For This Useful Post:

    jackavin (06-06-2008)

Bookmarks

Posting Permissions

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