Drop Shadow

Sample SQL Form

<? require_once("/web/includes/sso_portal.phpi"); $sso->authenticate(); include_once("/web/includes/sql.phpi"); $db = new MySQL('username', 'password', 'database', 'table'); ?> <html> <head> <title>Test SQL Include</title> <? $db->HTMLHead(); ?> </head> <body> <h1>Test SQL.phpi</h1> <? $extraFields=array('unet'=>$authenticatedUser); $db->where($extraFields); $updateFields=array('name', 'birthday', 'title'); IF ($insertID = $db->replace($updateFields, $extraFields)): ?> <p>Thank you for this information!</p> <? ENDIF; $db->displayForm($updateFields); ?> </body> </html>

This page will display a form of a person’s name, birthday, and title, showing the person according to their MySanDiego account. The table would be created using something like:

CREATE TABLE `people` ( `ID` int(11) NOT NULL auto_increment, `name` varchar(32) NOT NULL, `birthday` date default NULL, `title` varchar(99) default NULL, `unet` varchar(20) NOT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `unet` (`unet`) );