How to put Delete button PHP? please help.. thanks

Recommended Answers

All 4 Replies

Do you know html ?

I know html i just want to know how can I delete multiple rows of mysql result using a button inside a php.

<form action="delete.php" method="post">
<input type="submit" value="Delete" />
</form>
<?php
//delete.php

mysql_query("DELETE * from exampletable");
?>

and code for button is:

<input name="delbutton" type="submit" >
//this shuld be inside of form tag..

And

if(isset($_POST['delbutton']))
{
//write your deletion queries...
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.