I'm new in PHP developing.
I have a looping textbox
$i = 0;
while($row_recordset = mysql_fetch_array($query_run))
{
echo "<tr>";
echo " <td>{$row_recordset['REGNO']}</td>
<td>{$row_recordset['NAME']}</td>
<td><input type='text' name='atten_ave".$i."'></td>
";
echo "</tr>";
$i++;
}
and as you can see I assign a different names in the textbox via array.
I want to echo the value of the textbox into another page to check if it submit the data before I insert it into the database, But there is an error after I execute the page.
$atten_ave = $_POST['atten_ave'.$i];
echo $atten_ave;
Here's the error
Notice: Undefined variable: i in BLAH BLAH BLA
Notice: Undefined index: atten_ave in BLAH BLAH BLAH
I already change the error_reporting in php.ini and set the E-NOTICE
But the error still exist.
I also try to suppress notice errors by putting '@' before the $atten_ave = $_POST['atten_ave'.$i]
. But there is no value that was submitted, even I input a value at the textbox.
'; $i++; } – zeus2026 Apr 26 '13 at 08:06