I am creating a HTML page that creates a large excel database, and gives the user the option to search and display the contents filtering certain parameters. This works great so far, however now I am trying to add the option to update the excel database based on user input from the user changing the generated textboxes in the HTML page. When my php generates the textboxes I had it generate the name of the textbox as the name of the cell it pulled the data from. Now when trying to pull the changed data from the html text box, I would like to use $_GET[$cell], cell being the variable in php which runs in a loop to generate the names of each cell or corresponding labeled html textbox. I know this cannot be done this way, which is why I am looking for an alternative. Any ideas? -Thank you
<html>
<head>
<meta http-equiv="Content-Type" content="text/html"; charset=ISO-8859-1">
<button type ="submit" name="Submit" value="Revise" onclick="f1.action='Revise.php';return true;"> Revise </button>
<iframe width="4000" height="2000000" name="myiframe" src="Revise.php" method = "get"
<tr>
<td> <input type ='text' value= 'DLWR' name'C3'/></td><td> <input type ='text' value= 'DLWR' name'D3'/></td><td> <input type ='text' value= '2003' name'E3'/></td><td> <input type ='text' value= 'NS ' name'F3'/></td><td> <input type ='text' value= 'NS ' name'G3'/></td><td> <input type ='text' value= 'MTH' name'H3'/></td><td> <input type ='text' value= 'S ' name'I3'/></td><td> <input type ='text' value= '0' name'N3'/></td><td> <input type ='text' value= 'NS ' name'O3'/></td><td> <input type ='text' value= '185400' name'P3'/></td><td> <input type ='text' value= 'E' name'R3'/></td><td> <input type ='text' value= 'LCS' name'S3'/></td><td> <input type ='text' value= 'O ' name'T3'/></td><td> <input type ='text' value= '52' name'Y3'/></td><td> <input type ='text' value= '187366' name'AA3'/></td><td> <input type ='text' value= '52' name'AC3'/></td><td> <input type ='text' value= '0' name'AD3'/></td><td> <input type ='text' value= '0.41' name'AE3'/></td><td> <input type ='text' value= '0' name'AG3'/></td><td> <input type ='text' value= '21.32' name'AH3'/></td><td> <input type ='text' value= '21.32' name'AK3'/></td><td> <input type ='text' value= '20140528' name'AO3'/></td><td> <input type ='text' value= '198097' name'AP3'/></td><td> <input type ='text' value= 'NS ' name'AQ3'/></td><td> <input type ='text' value= 'E' name'AR3'/></td><td> <input type ='text' value= '4029176' name'AS3'/></td><td> <input type ='text' value= 'DLWR' name'C4'/></td><td> <input type ='text' value= 'DLWR' name'D4'/></td><td> <input type ='text' value= '2003' name'E4'/></td><td> <input type ='text' value= 'OHRY' name'F4'/></td><td> <input type ='text' value= 'OHRY' name'G4'/></td><td> <input type ='text' value= 'LCS' name'H4'/></td><td> <input type ='text' value= 'O ' name'I4'/></td><td> <input type ='text' value= '52' name'N4'/></td><td> <input type ='text' value= 'NS ' name'O4'/></td><td> <input type ='text' value= '187366' name'P4'/></td><td> <input type ='text' value= 'E' name'R4'/></td><td> <input type ='text' value= 'LCB' name'S4'/></td><td> <input type ='text' value= 'S ' name'T4'/></td><td> <input type ='text' value= '63' name'Y4'/></td><td> <input type ='text' value= '187366' name'AA4'/></td><td> <input type ='text' value= '11' name'AC4'/></td><td> <input type ='text' value= '0' name'AD4'/></td><td> <input type ='text' value= '0.41' name'AE4'/></td><td> <input type ='text' value= '0' name'AG4'/></td><td> <input type ='text' value= '4.51' name'AH4'/></td><td> <input type ='text' value= '4.51' name'AK4'/></td><td> <input type ='text' value= '20140528' name'AO4'/></td><td> <input type ='text' value= '198097' name'AP4'/></td><td> <input type ='text' value= 'NS ' name'AQ4'/></td><td> <input type ='text' value= 'E' name'AR4'/></td><td> <input type ='text' value= '4029176' name'AS4'/></td><td> <input type ='text' value= 'DLWR' name'C5'/></td><td> <input type ='text' value= 'DLWR' name'D5'/></td><td> <input type ='text' value= '2003' name'E5'/></td><td> <input type ='text' value= 'OHRY' name'F5'/></td><td> <input type ='text' value= 'OHRY' name'G5'/></td><td> <input type ='text' value= 'LCB' name'H5'/></td><td> <input type ='text' value= 'S ' name'I5'/></td><td> <input type ='text' value= '63' name'N5'/></td><td> <input type ='text' value= 'OHRY' name'O5'/></td><td> <input type ='text' value= '187366' name'P5'/></td><td> <input type ='text' value= 'L' name'R5'/></td><td> <input type ='text' value= 'LCS' name'S5'/></td><td> <input type ='text' value= 'P ' name'T5'/></td><td> <input type ='text' value= '63' name'Y5'/></td><td> <input type ='text' value= '187366' name'AA5'/></td><td> <input type ='text' value= '0' name'AC5'/></td><td> <input type ='text' value= '0' name'AD5'/></td><td> <input type ='text' value= '0.41' name'AE5'/></td><td> <input type ='text' value= '0' name'AG5'/></td><td> <input type ='text' value= '0' name'AH5'/></td><td> <input type ='text' value= '0' name'AK5'/></td><td> <input type ='text' value= '20140603' name'AO5'/></td><td> <input type ='text' value= '306552' name'AP5'/></td><td> <input type ='text' value= 'NS ' name'AQ5'/></td><td> <input type ='text' value= 'L' name'AR5'/></td><td> <input type ='text' value= '4021125' name'AS5'/>
<br />
</iframe>
</body>
</html>
And the PHP portion that calls each textbox individually would look like this in a perfect world:
for($n=1; $n<27; $n++){
$cell = $x . $y;
if(isset($_GET[$cell])){
$string = $_GET[$cell];
}
else{
break 1;
}
$objWorksheet ->getCell($cell) ->setValue($string);
echo "<td> <input type ='text' value= '$string' name = '$cell'/></td>";
$x=++$x;
}
</div>