home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / PM_Example.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  568 b   |  19 lines

  1. <?php
  2.     require_once("Auth/preferences.php");
  3.     $options = array("table" => "user_prefs");
  4.     $prefs = new PrefManager($dsn, $options);
  5.     
  6.     $prefs->setDefaultValue("fullname", "New User");
  7.     $prefs->setValue("jon", "fullname", "Jon Wood");
  8.     
  9.     $jonName = $prefs->getPref("jon", "fullname");
  10.     $billName = $prefs->getPref("bill", "")
  11.     
  12.     /*
  13.     * Outputs:
  14.     * <p>Jon's name is Jon Wood<br/>
  15.     *    Bills's name is New User</p>
  16.     */
  17.     echo "<p>Jon's name is $jonName<br/>";
  18.     echo "   Bill's name is $billName</p>";
  19. ?>