IT Community - Software Programming, Web Development and Technical Support

How to get multi combobox value in php

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 ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 10-09-2007, 07:52 AM
gk_cloud gk_cloud is offline
D-Web Trainee
 
Join Date: Sep 2007
Posts: 15
gk_cloud is on a distinguished road
Default How to get multi combobox value in php

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-10-2007, 06:20 AM
selvam0707 selvam0707 is offline
D-Web Trainee
 
Join Date: Aug 2007
Location: Chennai
Posts: 9
selvam0707 is on a distinguished road
Default Re: How to get multi combobox value in php

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>&nbsp;-&nbsp;
<select name="sel_dob[]">
<option value="jan">Jan</option>
<option value="feb">Feb</option>
<option value="mar">Mar</option>
</select>&nbsp;-&nbsp;
<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
)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-10-2007, 08:03 AM
gk_cloud gk_cloud is offline
D-Web Trainee
 
Join Date: Sep 2007
Posts: 15
gk_cloud is on a distinguished road
Default Re: How to get multi combobox value in php

Thank u i Want this..


Regards..
Gk
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-10-2007, 08:19 AM
gk_cloud gk_cloud is offline
D-Web Trainee
 
Join Date: Sep 2007
Posts: 15
gk_cloud is on a distinguished road
Default Re: How to get multi combobox value in php

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??????
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-11-2007, 05:31 AM
selvam0707 selvam0707 is offline
D-Web Trainee
 
Join Date: Aug 2007
Location: Chennai
Posts: 9
selvam0707 is on a distinguished road
Default Re: How to get multi combobox value in php

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-12-2007, 03:19 AM
gk_cloud gk_cloud is offline
D-Web Trainee
 
Join Date: Sep 2007
Posts: 15
gk_cloud is on a distinguished road
Default Re: THANK U

HI ,

thank u for ur reply...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-15-2007, 03:42 AM
selvam0707 selvam0707 is offline
D-Web Trainee
 
Join Date: Aug 2007
Location: Chennai
Posts: 9
selvam0707 is on a distinguished road
Default Re: How to get multi combobox value in php

k.
May i know your company name?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-15-2007, 09:40 PM
gk_cloud gk_cloud is offline
D-Web Trainee
 
Join Date: Sep 2007
Posts: 15
gk_cloud is on a distinguished road
Default Re: How to get multi combobox value in php

hi,Selvam

SentientIT Software solution.
Anna nagar.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-16-2007, 12:48 AM
selvam0707 selvam0707 is offline
D-Web Trainee
 
Join Date: Aug 2007
Location: Chennai
Posts: 9
selvam0707 is on a distinguished road
Default Re: How to get multi combobox value in php

ok.
hey wt's ur original name?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -7. The time now is 04:17 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0