Comments on: How to delete multiple rows from a table with jQuery? https://w3lessons.info/how-to-delete-multiple-rows-from-a-table-with-jquery Tutorials on PHP, jQuery & Amazon Web Services Sun, 02 Jun 2019 06:59:06 +0000 hourly 1 https://wordpress.org/?v=6.6.2 By: sherwan https://w3lessons.info/how-to-delete-multiple-rows-from-a-table-with-jquery#comment-5529 Sun, 02 Jun 2019 06:59:06 +0000 http://w3lessons.info/?p=1248#comment-5529 on the page just show “No record Found” can you help please?

]]>
By: sherwan https://w3lessons.info/how-to-delete-multiple-rows-from-a-table-with-jquery#comment-5528 Sun, 02 Jun 2019 06:58:08 +0000 http://w3lessons.info/?p=1248#comment-5528 global $wpdb;
$mdebug=1;
$server=”localhost”;
$username=””;
$password=””;
$db=”lab_test”;
$random_n=rand(0,10000);
$lab_test= new wpdb($server, $username, $password, $db);
if($lab_test==null)
echo “Failed!”;
else
{

delete ($lab_test,$mdebug, $random_n);
select_display_withdeletebutton($lab_test, $mdebug, $random_n);}
function delete_form($lab_test, $random_n, $ssn, $mdebug){

$site_url=get_site_url();
$actionPage=”$site_url/delete-data-form-employee”;
echo “”;
echo “”;
echo “”;
echo ” Delete
“;

echo “”;}
function delete ($lab_test, $mdebug, $random_n){
global $wpdb;
$form_random_n=$_POST[“random_n”];
if ($form_random_n!=null && $form_random_n!=$random_n)

{

$ssn=$_POST[“ssn”];
$qstr=”DELETE from employee where ssn=$ssn”;
echo “$qstr”;
$lab_test->query($qstr);
}}
function select_display_withdeletebutton($lab_test, $mdebug, $random_n)
{

$qstr=”select * from employee order by fname”;
$rows= $lab_test->get_results($qstr);
if ($rows==null)
echo “No record Found “;
else {

$field_num=4;
$field_names=array (‘fname’, ‘lname’, ‘bdate’, ‘ssn’);
$display_names=array (‘fname’, ‘lname’, ‘bdate’, ‘ssn’);
echo “<table border=1″;
for ($i=0;$i<$field_num;$i++)
echo "$display_names[$i]”;
echo “Delete”;
echo “”;
{
foreach($rows as $row){
echo “”;
for ($i=0;$i$field_name;
echo “$field_data”;

}
echo “”;
delete_form($lab_test, $random_n, $row->ssn);
echo “”;
echo “”;}}
echo “”;
}

]]>
By: fdfd https://w3lessons.info/how-to-delete-multiple-rows-from-a-table-with-jquery#comment-247 Sat, 04 Jun 2016 05:26:00 +0000 http://w3lessons.info/?p=1248#comment-247 buggy script.. cant select all checkbox after delete !!

]]>
By: fdfd https://w3lessons.info/how-to-delete-multiple-rows-from-a-table-with-jquery#comment-246 Sat, 04 Jun 2016 05:24:00 +0000 http://w3lessons.info/?p=1248#comment-246 fffdfd

]]>