0

Overview

this is a fast way to delete Records from your mysql datebase without loading the page .

this jquery code can Delete a Record with animation fade-out effect using jQuery and Ajax.
<FAKE SIGNATURE>

Edited by peter_budo: n/a

<?php

mysql_select_db('users',mysql_connect('localhost','root',''));

?>
<?php
include ('db.php');

if(isset($_POST['id'])){
$id = intval($_POST['id']);   
$delete = mysql_query("delete from users where id='$id'");
exit;
}

$sql = mysql_query("select * from users order by id asc");

echo "<ul>";

while($Row = mysql_fetch_array($sql)){
extract($Row);   
echo "<li>$name [<a id='$id' style='color:#ff0000;' class='delete' href='#'>Delete</a>]</li>\n";   
}

echo "</ul>";

?>
1
Contributor
0
Replies
1
Views
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.