delete from mysql ?
Posted: Fri May 13, 2011 7:52 am
Hi,
Ok i have no idea on how to do :/
Basically i have a script that gets info from a mysql database and prints in to a page. I have added checkbox infront of the data and a delete button
Mysql database name is "IP"
Format in the database is this:
id ip ipnote
1 1.1.1.1 test
2 2.2.2.2 test
3 3.3.3.3 test
4 4.4.4.4 test
What i need is for it to delete the selected lines from the database, maybe from the id
Thanks
Gemster
Ok i have no idea on how to do :/
Basically i have a script that gets info from a mysql database and prints in to a page. I have added checkbox infront of the data and a delete button
Code: Select all
<?php
while($bip = mysql_fetch_array( $data ))
{
?>
<input name="bcheck" type="checkbox" value="<?php echo $IP['id']; ?>" id="bcheck">
<?php
Print "<b>Ip:</b> ".$bip['ip'] . " ".$bip['ipnote'] . " <br>";
}
?>
<div>
<br>
<input name="bd" type="submit" id="bd" value="Delete">
Format in the database is this:
id ip ipnote
1 1.1.1.1 test
2 2.2.2.2 test
3 3.3.3.3 test
4 4.4.4.4 test
What i need is for it to delete the selected lines from the database, maybe from the id
Thanks
Gemster