Ok, I have my form pretty much completed. I need for you to guys to help me out with radio buttons. My site is
http://www.gkwinspired.com/contact/web_new.php
Alright, the form works beautifally except for the radio buttons, they don't send information through. I did some searching through this forum and found that radio buttons are sent as arrays, but no actual help on how to pull this off.
--
Greg
Radio buttons.
Moderator: General Moderators
- gkwhitworth
- Forum Commoner
- Posts: 85
- Joined: Tue Sep 05, 2006 8:28 pm
- Location: Wasilla, Alaska
Radio buttons.
Last edited by gkwhitworth on Sat Sep 16, 2006 12:20 am, edited 1 time in total.
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
You're site appears to be down, but check out http://www.echoecho.com/htmlforms10.htm -- make sure you're using the input tags correctly. The radio inputs are accessible to PHP as variables, not arrays. The selected radio button's value property is sent to PHP in a $_GET or $_POST entry with the key being the input's name property.
<input type="radio" name="groupOfButtons" value="foo"> Foo
<input type="radio" name="groupOfButtons" value="bar"> Bar
If "Bar" is selected, $_GET['groupOfButtons'] or $_POST['groupOfButtons'] (depending on your form's "method" property) will return "bar".
<input type="radio" name="groupOfButtons" value="foo"> Foo
<input type="radio" name="groupOfButtons" value="bar"> Bar
If "Bar" is selected, $_GET['groupOfButtons'] or $_POST['groupOfButtons'] (depending on your form's "method" property) will return "bar".
- gkwhitworth
- Forum Commoner
- Posts: 85
- Joined: Tue Sep 05, 2006 8:28 pm
- Location: Wasilla, Alaska
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
You'll want to use a checkbox for boolean options -- radio buttons are used to select one of a list. Check out http://www.globalissa.com/articles/articleCheckbox.php.
- gkwhitworth
- Forum Commoner
- Posts: 85
- Joined: Tue Sep 05, 2006 8:28 pm
- Location: Wasilla, Alaska
IT WORKS! Now on to the mail() function.
I changed them....it works now...thanks aaron.
--
Greg
--
Greg
hey nice site design... very clean! one suggestion though... when you click on the main navigation buttons, that particular page name replaces "home" in the uhh active page thing on the left. I like that little feature... it's nice... but I would move the box to the pagename instead of moving the pagename to the box. It confuses people when links change position from page to page. Othat than that I really like your design!
this is what I mean
[/offtopic]
this is what I mean
[/offtopic]
- gkwhitworth
- Forum Commoner
- Posts: 85
- Joined: Tue Sep 05, 2006 8:28 pm
- Location: Wasilla, Alaska
Thanks
Thanks....I knew what you were getting at....I hope that you didn't photoshop that too long.
Anyways, I have been planning on redoing the template anyways for other reasons, but that was my first seamless CSS design....only 2 pictures total in the template.
--
Greg
--
Greg