Re: following radio & hidden does not work..... help please.

Discussion in 'HTML' started by cwdjrxyz, May 30, 2008.

  1. cwdjrxyz

    cwdjrxyz Guest

    On May 30, 4:42 pm, dba <> wrote:
    > using the following code with a problem....
    >
    > echo "<input type='hidden' name='member_id' value=\"{$row[0]}\">{$row[0]}";
    >
    > echo "<input type='radio' name='member_name' value=\"{$row[1]}\">{$row[1]}<br />";
    >
    > The post_data.php program posts the following
    >
    > member id is: 0009
    > member_name is: Ralph Jones
    > cccb_name is: Annexation Committee
    >
    > Everything is ok but the member id. The number listed '0009' is the number of the last name in the
    > returned result. It is NOT the number listed with Ralph Jones which is '0007'.
    >
    > This works the same with a radio button or a select statement.
    > Any help will be appreciated.


    I agree with the answer you were given in comp.lang.php. In plain
    English, it says that you are unlikely to get help on this question
    anywhere unless you post a more complete version of the code or a
    working example on a web site(the best way).
     
    cwdjrxyz, May 30, 2008
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed dba <>
    writing in news:4840a527$0$4112$:

    Please do not top post. See bottom of post.

    > cwdjrxyz wrote:
    >> On May 30, 4:42 pm, dba <> wrote:
    >>> using the following code with a problem....
    >>>
    >>> echo "<input type='hidden' name='member_id'
    >>> value=\"{$row[0]}\">{$row[0]}";
    >>>
    >>> echo "<input type='radio' name='member_name'
    >>> value=\"{$row[1]}\">{$row[1]}<br />";
    >>>
    >>> The post_data.php program posts the following
    >>>
    >>> member id is: 0009
    >>> member_name is: Ralph Jones
    >>> cccb_name is: Annexation Committee
    >>>
    >>> Everything is ok but the member id. The number listed '0009' is the
    >>> number of the last name in the returned result. It is NOT the number
    >>> listed with Ralph Jones which is '0007'.
    >>>
    >>> This works the same with a radio button or a select statement.
    >>> Any help will be appreciated.

    >>
    >> I agree with the answer you were given in comp.lang.php. In plain
    >> English, it says that you are unlikely to get help on this question
    >> anywhere unless you post a more complete version of the code or a
    >> working example on a web site(the best way).

    >
    > How much code do you need? The question is fairly simple. Using a
    > radio input or a select input can you get multiple variables returned.
    >
    > Three variables are needed
    > member_id
    > member_fname
    > member_lname
    >
    > Current sql returns concatenated fname and lname. I can not get third
    > variable to POST in action php code.
    >


    This is a server side question, and more importantly a db question.
    What is your query, and what results are returned from the query?


    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, May 31, 2008
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed dba <>
    writing in news:4841560a$0$31733$:

    Again, please do not top post.

    > Adrienne Boswell wrote:
    >> Gazing into my crystal ball I observed dba <>
    >> writing in news:4840a527$0$4112$:
    >>
    >> Please do not top post. See bottom of post.
    >>
    >>> cwdjrxyz wrote:
    >>>> On May 30, 4:42 pm, dba <> wrote:
    >>>>> using the following code with a problem....
    >>>>>
    >>>>> echo "<input type='hidden' name='member_id'
    >>>>> value=\"{$row[0]}\">{$row[0]}";
    >>>>>
    >>>>> echo "<input type='radio' name='member_name'
    >>>>> value=\"{$row[1]}\">{$row[1]}<br />";
    >>>>>
    >>>>> The post_data.php program posts the following
    >>>>>
    >>>>> member id is: 0009
    >>>>> member_name is: Ralph Jones
    >>>>> cccb_name is: Annexation Committee
    >>>>>
    >>>>> Everything is ok but the member id. The number listed '0009' is
    >>>>> the number of the last name in the returned result. It is NOT the
    >>>>> number listed with Ralph Jones which is '0007'.
    >>>>>
    >>>>> This works the same with a radio button or a select statement.
    >>>>> Any help will be appreciated.
    >>>> I agree with the answer you were given in comp.lang.php. In plain
    >>>> English, it says that you are unlikely to get help on this question
    >>>> anywhere unless you post a more complete version of the code or a
    >>>> working example on a web site(the best way).
    >>> How much code do you need? The question is fairly simple. Using a
    >>> radio input or a select input can you get multiple variables
    >>> returned.
    >>>
    >>> Three variables are needed
    >>> member_id
    >>> member_fname
    >>> member_lname
    >>>
    >>> Current sql returns concatenated fname and lname. I can not get
    >>> third variable to POST in action php code.
    >>>

    >>
    >> This is a server side question, and more importantly a db question.
    >> What is your query, and what results are returned from the query?
    >>

    > This is NOT a server side question! This is a HTML or PHP question!
    > The query and database return exactly what they should!
    >
    > Using a HTML radio button form as previously stated returns all the
    > data as requested. The problem seems to be HOW does one get more than
    > one database variable to be (transfered?) to the PHP action program.
    >
    > The objective of the form is to use either a (prefered select form) or
    > a radio button form so a user can select a person from the database.
    > The query works! What does not is not clear to me. Either the HTML
    > Select form or the HTML radio button form or the PHP which makes up
    > the ACTION=post.php program.
    >
    > It seems that good old HTML and/or PHP will not let me build a form
    > that will allow more than ONE variable to be $_POSTed to the php
    > program.
    >
    > I have built both radio and select. Can not find a way to bring more
    > that one variable back to the post.php program for posting to the
    > database.


    Then post a URL, your query and relavent PHP code.

    If I loop through a recordset and the resulting HTML is like this:
    <select name="foo">
    <option value="1" selected>1</option>
    <option value="2" selected>2</option>
    <option value="3" selected>3</option>
    </select>

    Then foo will post with an array with three values, eg foo = 1, 2, 3.

    If the HTML is like:
    <input type="radio" name="bar[]" value="1">1
    <input type="radio" name="bar[]" value="2">2
    <input type="radio" name="bar[]" value="3">3

    If the user does not select one of the radio buttons, the value of bar
    will not post.
    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, May 31, 2008
    #3
  4. dba wrote:

    > This is NOT a server side question! This is a HTML or PHP question!
    > The query and database return exactly what they should!


    Heh.

    > It seems that good old HTML and/or PHP will not let me build a form
    > that will allow more than ONE variable to be $_POSTed to the php
    > program.


    That's absurd. I've got HTML->PHP using ~40 variables and all of them
    show up in the action script using $_POST('word-of-var')

    You're going to have to post your action script, and probably the HTML
    as well.

    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, May 31, 2008
    #4
  5. dba wrote:

    > Again, quit asking for people to follow an idiotic practice like
    > bottom posting.


    When in Rome...

    open the front cover and begin reading there?
    the back cover and end up at the front or do you
    chapter one or do you start somewhere near
    When reading a book, do you start at

    Inline posting, with proper trimming, is best.

    > It's NOT going to happen. If you and a few other zealots want to
    > continue to be members of the flat earth society fine. Good for you!


    If you follow the standard practice of these newsgroups, more people
    will be inclined to help you.

    > Maybe I am doing this work on my computer and not the net. Ever think
    > of that?


    Of course. You can still post the contents of your action script. As I
    replied earlier, I have forms with 40 or more $_POST variables, and they
    work just fine.

    You seem to have a problem with your script, and unless you post it, all
    you will get is guesses, and they will stop soon.

    You should also learn to trim quotes, too. That's another Usenet
    Netiquette guideline.

    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, May 31, 2008
    #5
  6. Gazing into my crystal ball I observed dba <>
    writing in news:4841b767$0$4084$:

    > Again, quit asking for people to follow an idiotic practice like
    > bottom posting. It's NOT going to happen. If you and a few other
    > zealots want to continue to be members of the flat earth society fine.
    > Good for you!
    >


    Plonk!

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Jun 1, 2008
    #6
  7. dba wrote:

    [Beauregard wrote: (please do not strip attributes)]
    >> You seem to have a problem with your script, and unless you post it,
    >> all you will get is guesses, and they will stop soon.

    >
    > It is NOT a problem with my script.
    >
    > Answer one question.
    >
    > Create a SELECT form using database records for user to make a
    > selection. The database record will have more than 3 fields but for
    > your pass to the php program only 3 will be necessary.
    >
    > Now show me how your user can select a name from your select program
    > and pass 3 variables from the database to your php proces program.
    >
    > Can you do this????


    Yes.


    >> You should also learn to trim quotes, too. That's another Usenet
    >> Netiquette guideline.


    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, Jun 1, 2008
    #7
  8. Adrienne Boswell wrote:

    > Gazing into my crystal ball I observed dba <>
    > writing in news:4841b767$0$4084$:
    >
    >> Again, quit asking for people to follow an idiotic practice like
    >> bottom posting. It's NOT going to happen. If you and a few other
    >> zealots want to continue to be members of the flat earth society fine.
    >> Good for you!
    >>

    >
    > Plonk!


    Heh.

    He's probably pledging Google Groups. Is this rush week? :)

    --
    Blinky
    Killing all posts from Google Groups
    The Usenet Improvement Project --> http://improve-usenet.org
    Found 5/08: a free GG-blocking news *feed* --> http://usenet4all.se
     
    Blinky the Shark, Jun 1, 2008
    #8
  9. cwdjrxyz

    dorayme Guest

    In article <4841ded2$0$30242$>,
    dba <> wrote:

    > SEE THAT YOU DO!!!!
    >
    > Adrienne Boswell wrote:
    > > Plonk!
    > >


    dba, you will regret this. I have found, from long experience, that the
    killfiles of the nicest people are really very bad indeed, whereas the
    conditions in the killfiles of the meanest of the mean are paradoxically
    very nice indeed, and often interesting in quite unexpected ways.

    I have a theory as to why this is so, you can order my small essay on
    this for just $US4.50

    And I have a book coming out soon on my travels in kf land and you can
    register for an advance copy by sending me $US25.

    You can get discounts on this if you can manage to keep top posting here
    for another month straight without having nearly everyone plonk you.

    --
    dorayme
     
    dorayme, Jun 1, 2008
    #9
  10. dba wrote:

    > And all the little girls/fags chime in. What a surprise.


    An exercise for your spare time:

    a. count the number of people in your threads
    who are top-posting
    b. count the number of people in your threads
    who are inline- or bottom-posting
    c. from the results, determine what is the accepted practice
    in these groups

    This is not email.

    For every disparaging remark you post, your chance of receiving real
    help diminishes. <looks for definitions of "order of magnitude" and
    "bite the hand that feeds you">

    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, Jun 1, 2008
    #10
  11. dba top-posted the following:

    > Your [sic] full of it. Being an annoying lying twit comes natural for
    > you doesn't it?


    Another old adage: "When you're already in a hole, stop digging."

    > Beauregard T. Shagnasty wrote:
    >> dba wrote:
    >>> Can you do this????

    >>
    >> Yes.


    I was going to help you.

    In fact, if you were to post your action script (the one that acts upon
    your form), I might still be inclined to do so.

    Or not.

    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, Jun 1, 2008
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Petterson Mikael

    test of following-sibling[2] does not work

    Petterson Mikael, Feb 6, 2006, in forum: XML
    Replies:
    1
    Views:
    851
    George Bina
    Feb 6, 2006
  2. KK
    Replies:
    2
    Views:
    596
    Big Brian
    Oct 14, 2003
  3. Marcus
    Replies:
    4
    Views:
    402
    Marcus
    Feb 22, 2012
  4. sam
    Replies:
    5
    Views:
    237
  5. Replies:
    1
    Views:
    750
Loading...

Share This Page