36 users online (0 members and 36 guests)  


  Results 1 to 5 of 5

Related

  1. checkbox madness    Forum: ASP Forum
    Replies: 1
  2. checkbox madness    Forum: HTML Forum
    Replies: 0
  3. No footer and checkbox    Forum: PHP Forum
    Replies: 5
  4. javascript checkbox    Forum: Javascript Forum
    Replies: 3
  5. HTML/VBSCRIPT checkbox help...please    Forum: Website Scripts Forum
    Replies: 4
  1. #1
    manjunath1985's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    3

    Unhappy Problem in checkbox [PHP]

    I have created a php page called viewdb.php which retrieves usernames from the databse and displays it, for these usernames i have created a checkbox<input type="checkbox" name="check[]" value="<?=$rs[username]?>">, i want to pass multiple selected checkbox value to next page called "send_sms.php" after i select <option value="http://send_sms.php">sms</option> and press on "go" button.

  2. #2
    dcuerrier's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Location
    Brossard, Quebec, Canada
    Posts
    13

    Re: Problem in checkbox [PHP]

    Hi Manjunath,
    When I have to do something like that, I use JavaScript to transfert each checkbox value in one variable. You can't name two checkbox with the same name. Or you may simply name each checkbox with an increment name, like chbx0 chbx1 chbx2... made by a foreach loop, and transfert that data in your send_sms.php. Feel free to ask again if you dont understand my explanation

  3. #3
    manjunath1985's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    3

    Unhappy Re: Problem in checkbox [PHP]

    Hi,
    I know its quite late to reply, i am sorry....
    Thanks for your reply.
    Plz help me out with the code.Just post a code, how to increment checkbox using foreach loop....then it wil be helpful..
    Its very urgent....

  4. #4
    dcuerrier's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Location
    Brossard, Quebec, Canada
    Posts
    13

    Re: Problem in checkbox [PHP]

    Well... im not sure to understand what you want but here it is...
    for ($i=0;$i<20;$i++)
    echo "<input type='checkbox' name='checkbox$i'>";

  5. #5
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Re: Problem in checkbox [PHP]

    Allow me to welcome you both to the webamster forums
    dcuerrier, I apologize for not getting back to you but I want to let you know how much I appreciate the help that you and all others give to your brothers and sisters in the webmaster communities across the net.

    Dave
    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting



Tags for this Thread