PHP/Class/ set
__set( ) method is called whenever an undefined property is set in your scripts
<source lang="html4strict">
<?
class MyTable { public $Name; public function _ _construct($Name) { $this->Name = $Name; } public function _ _set($var, $val) { mysql_query("UPDATE {$this->Name} SET $var = "$val";"); } } $systemvars = new MyTable("systemvars"); $systemvars->AdminEmail = "t@s.net";
?>
</source>