<?php require_once('Connections/FMKickers.php'); ?>
<?php
$new_user_add = $FMKickers->newAddCommand('Users');
$new_user_fields = array('email'=>$_REQUEST['email'],'password'=>$_REQUEST['password'],'firstName'=>$_REQUEST['firstName'],'lastName'=>$_REQUEST['lastName'],'address'=>$_REQUEST['address'],'city'=>$_REQUEST['city'],'state'=>$_REQUEST['state'],'zip'=>$_REQUEST['zip'],'phone'=>$_REQUEST['phone'],'emergency_contact'=>$_REQUEST['emergency_contact'],);
foreach($new_user_fields as $key=>$value) {
    $new_user_add->setField($key,$value);
}

$new_user_result = $new_user_add->execute(); 

if(FileMaker::isError($new_user_result)) fmsTrapError($new_user_result,"error.php"); 

$new_user_row = current($new_user_result->getRecords()); 

fmsRedirect('login.php'.'?errorMsg='."Account created, please login"); 
 // FMStudio v1.0 - do not remove comment, needed for DreamWeaver support ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
</body>
</html>
