PDOCrud Add action buttons

You can add extra action buttons to perform many operations like switch, url redirection etc. Below are example of how to add url action button and switch. URL action is for redirecting to another website with some value and switch can be used for on/off operation (like approve/disapprove, publish/unpublish).

  
                                $pdocrud = new PDOCrud();
                                $pdocrud->crudTableCol(array("first_name","last_name","no_of_adult","no_of_child","booking_amount","booking_status"));
                                $action = "http://google.com/?id={col_name}";
                                $text = '';
                                $attr = array("title"=>"Redirect URL");
                                $pdocrud->enqueueBtnActions("url", $action, "url",$text,"booking_status", $attr);
                                $action = array("1"=>"0","0"=>"1");//action to be performed, like when value is 1 set it to 0
                                $text = array("1" => '',"0"=>'');
                                $attr = array("title"=>"Redirect URL");
                                $pdocrud->enqueueBtnActions("btnswitch", $action, "switch",$text,"booking_status", $attr);
                                echo $pdocrud->dbTable("bookroom")->render();
                                

Deprecated: Required parameter $field follows optional parameter $op in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 924

Deprecated: Required parameter $task follows optional parameter $op in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 924

Deprecated: Required parameter $totalrecords follows optional parameter $page in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrudHelper.php on line 191

Bookroom

Showing 1 to 1 of 1 entries

# First name Last name No of adult No of child Booking amount Booking status Actions
1 W P 1 0 5 0
# First name Last name No of adult No of child Booking amount Booking status Actions