Dynamically Adding Rows to an HTML Table and passing the values

Hi Iam fairly new at php and need some help understanding how to pass values. I am adding rows to a table dynamically but am only storing the value of the first row added. Can you please help me understand how to store rows 2, 3, 4 etc. when I submit page 1 below. Thanks for any help you can provide.

Page 1.
[php]

Please list players below
Name Handicap Shirt Size

[/php]

Page 2

[php]

"/>
"/>
"/>
< [/php]

Hi,

Have you looked at the ‘name’ property of your input fields?
You need to name them all uniquely otherwise their values will disappear.
I mean:
[php]

<?php if ( array_key_exists( 'vlook', $_POST ) ) { echo $_POST['vlook']. '
'; // Will ALWAYS show 'value_4' } ?>



[/php]

You could of course start working with arrays. You will need to name all your input-fields with ‘[]’ postfixed to the existing names. Keep in mind that in the processing PHP you will need to treat your inputs as arrays too.

I hope this helps a little.
O.

Sponsor our Newsletter | Privacy Policy | Terms of Service