Results 1 to 6 of 6

Thread: PHP and option buttons - general guidance

  1. #1

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819

    PHP and option buttons - general guidance

    http://www.paulkjohnson.com/modelbui...ct_request.htm

    This link is to a page that doesn't actually do anything yet. No code has been written since I have no idea where to start.

    The essence of the problem is that when the customer submits the form, the information they provide will be displayed on a Verification page. From there they can go back and make changes, cancel or submit. When they submit from the verification page, then the data will be entered into the db and dispatch and e-mail to me.

    So I have several questions:

    1) In the frames that have option buttons, how do I know which one has been selected? Does the submit button handle that or do I have to specifically check each option button in a single frame?

    2) How do I take the data from the second page (Verification form) and put it in the db. I know how to do it from page 1 directly, but not from page 2. And in either case I don't know how to handle the option buttons.

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    If you give the group of buttons the same name (which you appear to have done already), then the value of the selected radio will be passed to the script, e.g

    Is this a scale model?

    (*) Yes
    ( ) No

    The value of R1 (what you called them) will be the value of the selected button (V1 if they select Yes). If they select No, it will be V2. If they don't select either, the field will be blank

    You may want to rethink those names to make it a bit easier

    Slap a load of hidden fields on the verification page which contain all the data they entered. Then they will be submitted to the next script in an identical fashion to the first bit

  3. #3

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    Thanks Chris. That's what front page named them. I had planned to go back and change them to something more descriptive, but I wanted to see how much work this was going to be first. The other option is to just have them shoot me an e-mail which would probably be better anyway, but this is more "professional."

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    ah the dreaded Frontpage

  5. #5

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    You know, as much as I hear people bashing it, it's done a good job for me. Maybe I just don't know enough to see what's wrong with it, but I don't know a lick of HTML and my site isn't really that bad. It's not great either, but for someone who knows nothing of web design or html, I'm pretty impressed with how easy it made things for me.

    If they would just build in a PHP IDE that could debug in break mode like VB I'd be a really happy guy.

    Actually, I'd be just a little happier. I'll only be a really happy guy when I have an income again.

  6. #6
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    I like the stipped down version of FP that used to come with IE, FP Express. It's code writting skills are a lot better, less messy. You only need to add a doctype to the top and remove an IE-only attribute from the body tag to make it HTML 4 compliant (MS writing almost standards-compliant code, doesn't happen every day!)

    Check out www.zend.com. I heard they do an IDE for PHP which is similar to VBs

Posting Permissions

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



Click Here to Expand Forum to Full Width