while($report = mysql_fetch_assoc($result2))
{
$counter = count($report['Date']);
for($i = 0; $i < $counter; $i++)
{
$searchOutput .= "<tr><td name='uname".$i."'>".$report['Username']."</td><td name='utitle".$i."'>".$report['Title']."</td><td name='udesc".$i."'>".$report['Description']."</td><td name='udate".$i."'>".$report['Date']."</td><td><textarea rows='2' cols='30' name='comment".$i."' id='comment'></textarea></td></tr>";
}
}
$searchOutput .= "</table>";
echo $searchOutput;
$publish = '<div id="submit" align="center">
<form name="" id="" method="post">
<input type="submit" name="submit" id="submit" value=" Submit Report " />
</form>
</div>';
echo $publish;
Hello, I am trying to loop through the value generated from database.
What i want is to add a name to each generated with values from the database, then after filling the report for the generated data’s i will submit to another table where users can view their report.
I have use and try the above code, i couldn’t get any result.
I will be glad and grateful, if i could get a result worked out, or any tips to achieve my aim.
Thanks in advance.
Try this