i want this form to loop through counting the number of people in d table and geting the next name after submiting the first. i really need help

[<?php $getcat = mysql_query("SE LECT * FROM stud_registrati on where entry_class ='$g'");
$rss=mysql_fetc h_array($getcat );

?>

<table width="549">
<tr>
<td height="123"...