| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Sep 2006
Posts: 449
![]() ![]() ![]() | PHP Contact Form I have this code in my contact form and it doesn't post correctly. <label for="select-choice"></label> <select id="selected" name="selected" class="select" value="test"> <option value="">General</option> <option value="email 2">Service/Support</option> <option value="email 3">Estimate/Quote</option> </select> Can anyone tell me the Post code for a drop down menu please? |
| | |
| | #2 (permalink) |
| NamePros Regular Join Date: May 2008 Location: England
Posts: 771
![]() ![]() ![]() ![]() ![]() ![]() | can you show the whole form so we can see where it fits in the form? Also, for="" should contain the ID of the input it is the label for if you want to change that to be correct.
__________________ pixelhero Web Development Studios UK |
| | |
| | #3 (permalink) |
![]() Join Date: Jul 2005 Location: Coffs H, Australia
Posts: 3,456
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Would be nice to have some more info hoops. The entire form code as pixelhero suggested would be nice. And exactly how is it not posting correctly? Are there any values for $_POST['selected']? Possible problems I can see is that you have given your drop-down a static value in the opening select tag (No need to give the select tag a value, if you want a default value to be set, simply add " selected" in one of the option tags), and I would also stay away from naming your drop-downs "selected", although this probably isn't an issue. Here is an example of a working drop-down form (tested): PHP Code: Hope this helps, Rhett.
__________________ Free Forums / GoDaddy Coupon Codes (NEW DOMAIN!) / Free Arcade Script / <?='Your computer is '.(1?fine:broken).'.'?> |
| | |
| | #4 (permalink) |
| Senior Member Join Date: Jun 2008 Location: nodws.com
Posts: 1,666
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | the SELECT tag should not have a value.
__________________ SnackNames.com | SnackDesign.com | buckstabu.com | adoolt.com | yoAmoNY.com Developer For Hire! PHP/MySQL/Wordpress/Etc Graphic design, Corporate ID, Dev Ideas |
| | |
![]() |
| Currently Active Users Viewing This Thread: 2 (0 members and 2 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [4HIRE] PHP / MySQL / Javascript - Frameworks and OOP | alecksmart | Developers For Hire | 0 | 06-24-2011 12:47 AM |
| Hoax or not?? Paypal "GIFT option" with a riduculous contact form? | mitch007 | The Break Room | 4 | 06-20-2011 02:23 PM |
| Looking for a PHP Developer for my team! | domainpush | Web Development Wanted | 1 | 06-18-2011 06:51 PM |