Tag Archives: Load Form


load_form(mixed $key) : $this

Load an existing entry from DB.


mixed $key
  • A database table primary key value. Zero to load the very entry.

Load Form And Edit Existing Record

All we talked so far is adding new data using PHP Database Form, how about editing existing record? For that, we have a simple method called load_form(). Simply pass record unique identifier such as primary key to load existing record onto the form. That’s it.

In this example, it passes a hard coded value, 9; but You can certainly change that value dynamically.

// ... code omitted
$dbForm -> load_form(9); // load a single record with EmployeeID equals to 9
$dbForm -> display();

Live demo