hi people
i have a form which goes a bit like this
i didnt include everything - just the important stuff...
PHP:
while(list($id,$comment) = @each($disp_array)) { ?>
<tr><td>Date added:<?= $comment[dte] ?></td><td align='center' rowspan='5'><input type="checkbox" name="delete[<?= $id ?>]" value="yes"></td></tr>
<tr><td><input name="comm[<?= $id ?>]" size="30" maxlength="70" value="<?= $comment[name] ?>"></td></tr>
<tr><td><input name="comm[<?= $id ?>]" size="30" maxlength="70" value="<?= $comment[mail] ?>"></td></tr>
<tr><td><input name="comm[<?= $id ?>]" size="30" maxlength="70" value="<?= $comment[site] ?>"></td></tr>
<tr><td><TEXTAREA NAME="comm[<?= $id ?>]" ROWS=4 COLS=26 WRAP="virtual"><?= $comment[comm] ?></TEXTAREA></td></tr>
<? } ?>
its used to display guestbook entries.
for every row in the database it prints four textboxes plus one checkbox.
i have this other script which i have been using to delete entries. its like this...
PHP:
//delete entries
while(list($id,$flag) = @each($delete)) {
if ($flag == "yes" {
$query = "DELETE FROM $table_name WHERE commentid = $id";
$res = mysql_query($query);
}
}
this basically checks the id assigned to the checkboxes that are highlighted and deletes the row with that id.
what i would like to do is print out a sort of report on what was deleted. but not using just the id. id like it to look like...
you deleted:
Joe
Joe@joe.com
Hi, this is Joe!
from the database
for each entry that is deleted.
anyone know how to achieve that?
give me all your lentils
i have a form which goes a bit like this
i didnt include everything - just the important stuff...
PHP:
while(list($id,$comment) = @each($disp_array)) { ?>
<tr><td>Date added:<?= $comment[dte] ?></td><td align='center' rowspan='5'><input type="checkbox" name="delete[<?= $id ?>]" value="yes"></td></tr>
<tr><td><input name="comm[<?= $id ?>]" size="30" maxlength="70" value="<?= $comment[name] ?>"></td></tr>
<tr><td><input name="comm[<?= $id ?>]" size="30" maxlength="70" value="<?= $comment[mail] ?>"></td></tr>
<tr><td><input name="comm[<?= $id ?>]" size="30" maxlength="70" value="<?= $comment[site] ?>"></td></tr>
<tr><td><TEXTAREA NAME="comm[<?= $id ?>]" ROWS=4 COLS=26 WRAP="virtual"><?= $comment[comm] ?></TEXTAREA></td></tr>
<? } ?>
its used to display guestbook entries.
for every row in the database it prints four textboxes plus one checkbox.
i have this other script which i have been using to delete entries. its like this...
PHP:
//delete entries
while(list($id,$flag) = @each($delete)) {
if ($flag == "yes" {
$query = "DELETE FROM $table_name WHERE commentid = $id";
$res = mysql_query($query);
}
}
this basically checks the id assigned to the checkboxes that are highlighted and deletes the row with that id.
what i would like to do is print out a sort of report on what was deleted. but not using just the id. id like it to look like...
you deleted:
Joe
Joe@joe.com
Hi, this is Joe!
from the database
for each entry that is deleted.
anyone know how to achieve that?
give me all your lentils