SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Feb 2004
    Location
    toronto
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help with checkboxes (multidimensional array) HTML form

    Hi All,

    Happy Monday!

    I want to show the fields of each table in my DB as checkboxes in a user form that user can check and my program selects the column data from the DB depeneding on checked boxes.

    e.g.

    Table 1

    fields as checkboxes

    Table 2

    fields as checkboxes

    How do I get the info about the checked fields in each of the tables?


    I hope it's clear enough.

    Thank you all.

    lkj

  2. #2
    Non-Member
    Join Date
    Jan 2004
    Location
    Planet Earth
    Posts
    1,764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd imagine that with CHECKBOXes you are dealing with an array ?

    PHP Code:
    ...
    <
    input type="checkbox" name="Sample[]" ... /> 
    It's been a long time since I've used CHECKBOXes. I make an effort on a grand scale to avoid them where possible because they're a nightmare to work with IMO

    Sorry I cannot be more help though

  3. #3
    SitePoint Member
    Join Date
    Feb 2004
    Location
    toronto
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Widow Maker
    I'd imagine that with CHECKBOXes you are dealing with an array ?

    PHP Code:
    ...
    <
    input type="checkbox" name="Sample[]" ... /> 
    It's been a long time since I've used CHECKBOXes. I make an effort on a grand scale to avoid them where possible because they're a nightmare to work with IMO

    Sorry I cannot be more help though
    please read the question - i'm asking for help on multidimensional array. single array is working fine. How do i specify multidimensional array and retrieve info after form is submitted. Thx. lkj

  4. #4
    Non-Member
    Join Date
    Jan 2004
    Location
    Planet Earth
    Posts
    1,764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What really annoys me, and I'm sorry if you are offended, but please do not post your problem in both of the PHPs forums.

    One or the other, not both please

    Now that, that is out of the way, sorry my post couldn't help you. A possible solution that you'd be looking for would proberly be a recursive loop ?

    Not the best of things to script either at the best of time I'm afraid


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
  •