using checkbox in php to delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello
i have been trying to delete items from a guestbook using multiple checkbox
fields but have had no success

this is the code i have been using to add the checkbox's to the records:

while ($rows = mysql_fetch_array($result)) {

<?///////////////////////////////////////////////////////////////?>
<? //TABLE TO SHOW THE CONTENTS OF USER_MESSAGE DATABASE TABLE ?>
<?///////////////////////////////////////////////////////////////?>

<HTML>
<HEAD>
<TITLE>Queen Vic Message Book</TITLE>
</HEAD>
<BODY>

<P><TABLE BORDER="1" WIDTH="600" BORDERCOLOR=#F00000>

<TR>
<b>Date/Time Posted:</b> <? echo $orgdate; ?>
</TR>

<TR>
<TD><b>Name:</b> <? echo $rows['name']; ?></TD>

<TD><b>Email:</b>  <A HREF="mailto:<? echo $rows['email']; ?>">
   <? echo $rows['email']; ?></TR></TD>



<TR><TD COLSPAN="4">
<? echo $rows['message']; ?>
</TD></TR>
</TABLE>
<TD>
<b>Delete Message</b> <INPUT TYPE="CHECKBOX" NAME="DELETE" VALUE="Y">
</TD>
</P>
</BODY>
</HTML>

<?/////////////////////////////////////////////////////////////////?>
<?//// CLOSES LOOP CREATED FOR ADDING DATA TO TABLE?>
<?/////////////////////////////////////////////////////////////////?>
<? } ?>

this does add a checkbox to every record in the guestbook

how do i link the checkbox to each message id (which are auto incremented)
and then pass some code to delete every checked item??

please help me!!!!

thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux