This is a discussion on How to get multi combobox value in php within the PHP Programming forums, part of the Web Development category; How to get multi combobox value in php. For example, Date format combobox. like Date-Month-Year,these are all ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| How to get multi combobox value in php. For example, Date format combobox. like Date-Month-Year,these are all in the same field. How to get the value in three combobox for post data. Regards Gk_cloud ![]() |
| Sponsored Links |
| |||
| Assign the three combobox names as same with array bracket. It gives the post value in an array format. use the array to get combined values. CODE: DOB <select name="sel_dob[]"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> - <select name="sel_dob[]"> <option value="jan">Jan</option> <option value="feb">Feb</option> <option value="mar">Mar</option> </select> - <select name="sel_dob[]"> <option value="2005">2005</option> <option value="2006">2006</option> <option value="2007">2007</option> </select> OUTPUT: [sel_dob] => Array ( [0] => 1 [1] => jan [2] => 2005 ) |
| |||
| again ,sorry Its not work in my side. html <input type="text" name="Cost" id="textfield3" /> <input type="text" name="Payout" id="textfield2" /> <select name="StartDate" id="Month" class="Drp"> <option value="Jan">Jan</option> <option value="Feb">Feb</option> </select> <select name="StartDate" id="Day" class="Drp"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <select name="StartDate" id="Year" class="Drp1"> <option value=""></option> <option value="2007">2007</option> <option value="2006">2006</option> <select> PHP CODE $Payout=$_POST['Payout']; $Cost=$_POST['Cost']; $StartDate=$_POST['StartDate']; <-------???????????? hi, I want, how to get in the above three combobox field in my php code. Plz reply me?????? ![]() |
| |||
| hi, html change your combo box name "StartDate" to "StartDate[]". PHP $StartDate = $_POST['StartDate']; $startdate1 = $StartDate[0]."/".$StartDate[1]."/".$StartDate[2]; // month/date/year or $startdate1 = implode("/",$StartDate); // month/date/year |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/php-programming/4037-how-get-multi-combobox-value-php.html | |||
| Posted By | For | Type | Date |
| multi values with combobox - webdigity swicki - powered by eurekster | This thread | Refback | 10-18-2007 11:21 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi-Browser Compatibility | santhakumar | Web Design Help | 2 | 11-27-2007 09:16 PM |
| I have multi checkbox in my form... | gk_cloud | PHP Programming | 2 | 10-22-2007 06:31 AM |
| multi tasking, multi programming, multi threading | vigneshgets | Operating Systems | 1 | 07-18-2007 05:12 AM |
| Multi-layer switching | vadivelanvaidyanathan | Server Management | 1 | 07-16-2007 10:05 AM |
| combobox not displayed fully | nssukumar | Flash Actionscript Programming | 0 | 02-27-2007 07:31 AM |