require_once('xajax/xajax.inc.php'); $xajax=new xajax(); function form_name($arg) { $newContent=(string) $arg; if (!$newContent) $newContent="Gelieve uw naam in te geven."; else $newContent=''; $objResponse=new xajaxResponse(); $objResponse->addAssign("ctrl_user","innerHTML",$newContent); return $objResponse; } function form_email($arg) { $newContent=(string) $arg; $validEmail=preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $newContent); if (!$newContent || !$validEmail) $newContent="Graag een geldige email."; else $newContent=''; $objResponse=new xajaxResponse(); $objResponse->addAssign("ctrl_mail","innerHTML",$newContent); return $objResponse; } function deposit_data($arg) { $objResponse=new xajaxResponse(); $message=''; $file="loadvars.txt"; if (file_exists($file)) { $handle=fopen($file,'a'); $string=implode("&&",$arg); $strin.=";"; if (!fwrite($handle,$string)) $message.="