Hello All,
I am building a web based data entry project for my University Recycling Department
1) In the first level the user will enter the number of "rows" that he has to enter it can be any number form 4- 10 . Each row will contain "Vendor Name","Date","Net Recycled Weight"
2) Depending on the number of rows entered by the user I am generating a table structure that has
2.1) A <select> containing vendor names(I am querying for this and then storing the result in an Associative Array and then parsing it for select in every way)
2.2) A text box for the date
2.3) A text box for the Net Recycled Weight
------------------------------------------------
Here is the logic I have implemented so far
<html>
<head></head>
<body>
<form name = "form1" method = "post">
<select>HERE THE USER CAN SELECT THE NUMBER OF ROWS HE WANTS TO ENTER</select>
<input type = "submit" value = "submit1" name = "submit1">
</form>
<body>
</html>
<?php
if(submit1 has been clicked )
{
//HERE I AM GENERATING A DYNAMIC FORM BASED ON THE NUMBER OF ROWS COUNT
<form name = "form2" method = "post">
echo <table>
echo <tr>
echo<td>VENDOR</td>
echo<td>DATE</td>
echo<td>NET RECYCLED WEIGHT</td>
echo </tr>
for(IT ITERATES TILL I GENERATE THE NUMBER OF ROWS THAT HAS TO BE ENTERED)
{
I AM GENERATING ROWS HERE
}
echo <input type = "submit" name = "submit2" value = "submit2">
echo</table>
</form>
HOW CAN I ACCESS THE POST METHOD OF FORM 2
}
?>
MY PROBLEM
---------------
I WANT TO KNOW THE FOLLOWING
1) It this the correct way to do it
2) how can I access the data entered in each dynamic row as I have to validate it and then enter the data in MySql
3) I am not sure how I will access the submit button event of the dynamically generated form
I hope I can get some help
Thanks,
Marisha