PHP & MySQL

Soldato
Joined
5 Dec 2003
Posts
2,716
Location
Glasgow
hey I've just managed to get a while loop to go through a recordset to display a table . Thing is I want a link at the end of each row to delete a given row and then refresh the table on the page, what is the best way of doing this?

I have done all my html as php echo statements as opposed to going in and out of php tags all the time. I struggle with the escape characters to put a php variable in html tagd though.
 
Cleanest way would be to do wrap everying in a form, checkbox next to each entry, then do a for loop on the $_POST to work through and clear out the ones you select. Post your code and we'll have a look.

Yeah I would rather if I could just have an onclick event or something to do it so I can just refresh the DIV the table is in rather than the whole page with POST.

Code is in work but from memory something like

<?php

dbconnect yada yada

while ($rs)
echo "<table><tr><td>"
echo $rs("task_id")
echo "</td><td>"
echo $rs("comment")
echo "</td><td>REMOVE</td>
 
Back
Top Bottom