Hi, excuse me. Im new here, but i really need help. I can't find any idea to solve this.
so,i want to save data that i input to the table.
The table itself made from input form, consist row and columns as i order before.
here is code for table input.php
//made the columns
for ($i= 0; $i <=$baris-1; $i++){
//and the rows
echo "<tr>";
for ($j = 0; $j <= $kolom-1; $j++) {
//here is the input form, and each of data inputed here that i want to save it.
$sum = array('[$i][$j]');
echo "<td> </td>
<td><input size='5' type='text' name='data".$sum."' /></td>
";
}
}
echo "</tr>";
echo "<tr><td></td><td><input type='submit' name='submit' values='Submit' /></td></tr>";
//im not sure here in value='$sum'
echo "<tr><td></td><td><input type='hidden' name='banyak' value='$sum' /></td></tr>";
echo "</table>";
echo "</form>";
// here,which one should i $_GET[''] ?
?>
and, in process.php should show the average the all data, or any other math formula.
i use the single input data in process.php,and its totally wrong :s
---------------------------
sorry for my bad english..
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
no,it's not.
the rows and columns is okay. the problem is,how can i save the data that I input to the form inside the rows and columns,and i could use it later.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
resolved. sorry, i made this so hardly to understand with foreign language in variable.
so, for the input.php there's nothing to change.
in result.php
Code:
$kolom is $columns
$baris is $rows
then, change this line
PHP Code:
//here is the input form, and each of data inputed here that i want to save it.
$sum = array('[$i][$j]');
echo "<td> </td>
<td><input size='5' type='text' name='data".$sum."' /></td>
";
and should be like this
PHP Code:
//here is the input form, and each of data inputed here that i want to save it.
$data = array("[$i][$j]");
Bookmarks