Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder thindrakhya's Avatar
    Join Date
    Jun 2007
    Posts
    90
    Thanks
    8
    Thanked 0 Times in 0 Posts

    pass two values with one button

    i also asked problem similar to this in my previous post

    i am displaying users with class id and user id in the table format
    now every row has delete button

    i want class id and user id to delete the user
    how can i pass these two values using this delete button
    in PHP

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    use hidden form elements?
    Code:
    <input type='hidden' value='something' name='somethingelse' />

  • #3
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    You can use explode to separate values into an array. The code below uses an underscore as the separator.

    PHP Code:
    <?php

    $values 
    green_blue;

    $two_part_array explode('_'$values);

    echo 
    "$two_part_array[0]"// green
    echo "$two_part_array[1]"//blue

    ?>
    Last edited by Len Whistler; 09-03-2007 at 05:04 PM.
    Leonard Whistler

  • #4
    New Coder thindrakhya's Avatar
    Join Date
    Jun 2007
    Posts
    90
    Thanks
    8
    Thanked 0 Times in 0 Posts
    thanks friends


  •  

    Posting Permissions

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