i m creating a new row onclick containing 3 drop downs in it,
if i add 3 rows drop downs are shown but thier names are same, how can i change the name of every drop down in each row so that it can be handled on php page?

any help

Member Avatar for diafol

Could you rephrase that?

What's a new row onclick? Which row?

If this is what you mean:

<select name="drop1[]">...</select><select name="drop2[]">...</select><select name="drop3[]">...</select>

<select name="drop1[]">...</select><select name="drop2[]">...</select><select name="drop3[]">...</select>

THat will work as the $_POST var will give the index (first row = 0, second row = 1 etc):

$_POST['drop1'][0] = first row first drop


$_POST['drop3'][3] = fourth row third drop

thnx. nw its wrking :)

Member Avatar for diafol

Ok if it's solved, mark it solved with the link below

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.