require '../lib/webt_contacts.php'; webt_header("Address form", "../style/global.css"); ?>
id = $_GET["id"]; //elseif list of possible actions (only one action per site show allowed) if (isset($_GET["update"])) { //if is set "update" it is waiting also "phone_number" parameter with new update info $address->street=$_GET["address_street"]; $address->city=$_GET["address_city"]; $address->zip=$_GET["address_zip"]; $address->state=$_GET["address_state"]; if ($address->data_update()) echo MSG_UPDATED; } // TODO: thinkabout delete algorithm UI // WARNING: this is just simple delete with no drawback functionality elseif (isset($_GET["delete"])) { if ($address->data_delete()) { ?>

data_insert_relation_person($_GET["id_person"])) echo MSG_INSERTED; } elseif (isset($_GET["id_company"])) { //creates new relation between this phone and selected person if ($address->data_insert_relation_person($_GET["id_company"])) echo MSG_INSERTED; } $address->data_get(); $address->print_form(); ?> OK

print_list_person(); ?>

print_list_company();?>