Hello, Just started working with PHP and I am stuck on a particular script. The relevant part of the script is listed below. I am trying to read some data from a mysql server and display each row in a HTML table with a delete button next to that row. I am also passing the same information for every row in hidden text to the my HTML page. I am also generating an id name for each item in a row so that the user can click on any one of the delete buttons on the HTML page and delete the row in the database that's equal to that being displayed. I am thinking about using javascript to set the variables being submitted by the form to the value of any row on the HTML page where I click delete. Is there a better approach? Any help will be appreciated. Thanks.... #Display the table $rc=1;//row count variable $arg4 = 1;//start value for swap function $label = array('network','linename','hostname','msg', 'expire'); $sth = mysql_query("SELECT network,linename,hostname,msg,unixt_exp". " FROM ignore_list ORDER BY unixt_exp"); print " <TR> </TR>"; while ($row = mysql_fetch_row($sth)) { $color=my_color($arg4); print "<TR name=$rc bgcolor=$color>"; $rc2=1;//row count variable 2 for internal ids for ($i=0; $i<count($label)-1; $i++) { print " <TD align=center><INPUT TYPE=HIDDEN NAME='$rc . $rc2' ". "VALUE=\"$row[$i]\">" . $row[$i] . "</TD>"; $rc2 = $rc2 + 1;//update inner id name counter } print "<TD align=center>" . date('l, M. j, Y - h:i:s A', $row[4]). " CST </TD>"; print "<TD align=center><INPUT TYPE=SUBMIT NAME=action ". "VALUE=\" Del \"></TD>"; print "</TR>"; $arg4=swap($arg4);//change swap variable $rc1=$rc + 1; //update id name counter } mysql_free_result($sth); ?> </TABLE> </FORM> </BODY> </HTML>