Dizzy Docs
logo logo
  • Home
  • Documents
    • API

      All API Documentation

    • Chatty

      Chat App

    • PDO

      Everything PDO

    • Vici

      Tutorials & Courses

    • Coding

      Everything Coding

    • Tech Stuff

      Geek Out

    • Random

      Docs with no Home

    • Business Workflows

      Everything we need to know for work

  • Notes
  • Manual
logo logo
Free Trail


Doc Navigation

  • Getting Started
  • briefcaseDizzyDoc Samples
  • briefcasePDO Crud
    • Forms
    • Filter and Search
    • Settings
    • Action Buttons
    • Filter Samples
    • Customizations
    • PHP Codes
    • Graphs / Charts
    • Misc
    • Plugins
    • Useless Right Now
    • References / Notes
  • PDO
    • Table
      • Table View
      • Table Formatting
    • Forms
      • Form View
      • Form Formatting
  • briefcaseLinks
    • Tools
    • References
I just dont see a need right now
			    
				echo $pdocrud->dbTable("orders")->render("ONEPAGE"); // FORM AND TABLE ON ONE PAGE
				//
				$pdocrud->currentPage(2);//set current page
				//
				

			    
			  
Trigger Other Operations
			    
				$pdocrud->setTriggerOperation("student", array("total_attendance" => array("type" => "fixed", "val" => 10)),array(), "insert", "after_insert");
				$pdocrud->setTriggerOperation("student", array("total_attendance" => array("type" => "last_insert_id")),array(), "insert", "after_insert");
				$pdocrud->setTriggerOperation("student", array("total_attendance" => array("type" => "array_data", "val" => "student_id")), array(), "insert", "before_insert");
				$pdocrud->setTriggerOperation("student", array("total_attendance" => array("type" => "fixed", "val" => 12)),array("student_id"=> array("type" => "array_data", "val" => "student_id")), "update", "after_update");
			    
			  
Other
			    
				// Login page code
				// (Optional step) before checking the login data if you want to peform any operation like password encryption etc/(optional)
				$pdo_crud->addCallback("before_select", "beforeloginCallback");
				$pdo_crud->formFields(array("email", "password"));
				$pdo_crud->setUserSession("userName", "user_name"); // SESSION VARIABLES (VARIABLE NAME / DB TABLE VALUE)
				$pdo_crud->setUserSession("role", "role");
				$pdo_crud->setUserSession("lastLoginTime", date("now"));
				$pdo_crud->formRedirection("http://pdocrud.com/demo/allforms/user-access-management/after-login-page.php", true); // 2nd PARAMETER - REDIRECT IF NO RECORD FOUND
				// Any page to check access management code
				if ($pdo_crud->checkUserSession("userId")) {
				    if ($pdo_crud->checkUserSession("role", array("admin", "author", "editor"))) {
				        echo "Welcome ".$pdo_crud->getUserSession("userName");
				        echo $pdo_crud->dbTable("employee")->render();
				    }
				    echo "You don't have sufficient permission to access this page.";
				} else {
				    echo "You are not allowed to access this page.";
				}
				//
				// Logout  page code
				$pdo_crud->unsetUserSession("userName");
				$pdo_crud->unsetUserSession(); // OR UNSET ALL USER SESSION VARIABLE SET BY setUserSession function
				//
				//Optional callback actions
				//Add following code in script/pdocrud.php. This is basically callback functions so must be present in the script/pdocrud.php
				//example of how to add action function
				function beforeloginCallback($data, $obj) {  
				//do something like if your passwords are md5 encrypted then change the value
				$data["login"]["password"] = md5($data["users"]["password"]);
				return $data;
				}
	
			    
			  

© 2020 All Rights Reserved by KbDoc

Video Playback Not Supported