SELECT field in a HTML form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rodrigocaldeira
Forum Commoner
Posts: 27
Joined: Wed Mar 05, 2003 6:40 pm
Location: Brazil
Contact:

SELECT field in a HTML form

Post by rodrigocaldeira »

Hi everyone,

I have a form that contains a SELECT field named chkProduto2 with the "multiple" option enabled.

How could PHP read the selected options in this field?

Note.: I cant rename my field to "chkProduto2[]" because my Javascript validation will not work correctly.


Cheers


Rodrigo Caldeira
rodrigocaldeira
Forum Commoner
Posts: 27
Joined: Wed Mar 05, 2003 6:40 pm
Location: Brazil
Contact:

Post by rodrigocaldeira »

I solve it yet!


I create a function that change the field's name to cboProduto[] in submit moment
illes
Forum Newbie
Posts: 4
Joined: Tue Mar 08, 2005 4:30 pm

Post by illes »

rodrigocaldeira wrote:.. create a function that change the field's name in submit moment
Could you please post your function?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

there's no need to have Javascript rename the field. If you correctly reference the field in the first place, it's name doesn't matter much.

viewtopic.php?t=25976
Post Reply