If you want to check whether record with same value exists or not before inserting data,
you can call checkDuplicateRecord() function to achieve it. It accepts array of fields that
needs to be checked for duplicate record. For example, you can pass username and email in this
function to check for duplicate record. It will return record already exists message if there
is already field with same value exist.
Before this version, you can also do this functionality using the callback function.
$pdocrud = new PDOCrud(); $pdocrud->formFields(array("register_number","first_name","last_name","email")); //Check for duplicate record. You can pass multiple fields also. $pdocrud->checkDuplicateRecord(array("register_number")); echo $pdocrud->dbTable("student")->render("insertform");