Populating a form and processing.
I've got a form where the user is first asked how many rows are required. I then use a 'for' loop to populate the table with each row having 4 fields to fill. I want to be able to name these fields and then to process the form and extract the variables. I've done it as follows but it dosent work, page says unidentified variable.
for ($r = 0 $r <= $rows; $r++){
echo "<tr>";
echo "<td><input name="note$r" etc )</td>"
echo "<td><input name="amount$r" etc )</td>"
echo "<td><input name="rate$r" etc )</td>"
echo "</tr>"
}
Submit button inserted
if(form submitted){
for( $a=0; $a <= $rows; $a++){
$note$a = $_POST['$note$a'];
}
I have also tried changing 'note$r' to note_$r and note[$a]
how should I go about labeling things so that I can create the variables?