Here's a bit of a puzzle. I am defining a recordset and then using that to build a form. It correctly reports that the number of records, but it always shows the records less the first on. I'd appreciate any ideas. Thanks in advance.
mysql_select_db($database_app, $app);
$query_App = "SELECT * FROM users ORDER BY UserName";
$AppRS = mysql_query($query_App, $app) or die(mysql_error());
$row_AppRS = mysql_fetch_assoc($AppRS);
$totalRows_AppRS = mysql_num_rows($AppRS);
echo "<p>Number of rows: $totalRows_AppRS<br>Returning results:</p>";
$style="odd";
echo "<table>\n";
echo "<tr><th>Number</th><th>UserName</th><th>Password</th><th>InputDate</th></tr>\n";
$i=1;
while ($row = mysql_fetch_assoc($AppRS))
{
if ($style=="odd") { //set rows as even and odd
$style = "even";
}
else {
$style = "odd";
}
echo "<td>".$i."</td><td><input name=UserName".$i." type=text onKeyPress=return noenter() size=20
value=".$row['UserName']."></td>";
echo "<td><input name=Password".$i." type=text onKeyPress=return noenter() size=20
value=".$row['Password']."></td>";
echo "<td><input name=InputDate".$i." type=text onKeyPress=return noenter() size=20
value=".$row['InputDate']."></td>";
echo "<td><Input name=deleteBox".$i." type=checkbox value=Delete>Delete</td>";
echo "<td><Input name=editBox".$i." type=checkbox value=Edit>Edit</td>";
echo "</tr>\n";
$i=$i+1;
}
echo "</table>\n";