update()

Updates the record corresponding to the currently set primary key(s) of the class. any unset variables will result in NULL values being saved in the database

For single primary key tables, updates references from lookup tables only if the lookup table has exactly 2 fields.

Example:

example.php
<?php
include("lib.php");
load("person");

$p = new person($_GET["person_id"]);
$p->set_state("FL");
if (!
$p->update())
{
    echo 
"Failed to update";
    return 
0;
}
echo 
"Update Successful";

?>