<?php
?>
<html>
<head>
<script language='javascript'>
function showList(){
var i=0;
var rankNum;
rankNum = 1;
var vfundsym;
while (i<=5)
{
alert(rankNum + " " + document.getElementById("o" + (i+1)).value);
i++;
rankNum++;
}
}
</script>
</head>
<body>

<form action="getuser3.php" method="post">
<input type="text" id='fundAge' name="fundAge" size="7" maxlength="7" />
<input  style="visibility: visible" id="addFundtoDB" type="submit" value="Update Database" />
</form>

<p>The form above updates one record in the database. How can I loop through the form below and update each record?</p>

<form name="orderedlist" action="getuser3.php" method="post">
<form>
<table>
<tr><td><textarea class="orderedlist" name="p1" id="o1"></textarea></td></tr>
<tr><td><textarea class="orderedlist" name="p2" id="o2"></textarea></td></tr>
</table>
<input type="button" value="run SHOWLIST function" onclick="showList()">
</form>
</body>
</html>