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

No related content found.

Tags:

PHP Database Form
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.