New Loan -- Under construction


Unable to connect to the database server.

" . "

Error code " . mysql_errno() . ": " . mysql_error() . "

"; else { if (!@mysql_select_db($db_name, $db_connect)) echo "

Connection error. Please try again later.

"; else { $today = date("Ymd"); $TableName = "account"; $SQLstring = "INSERT INTO $TableName (login,password,firstName,lastName,email,active,dateOpened) VALUES ('$Login','$Password','$First','$Last','$Email',1,'$today')"; $QueryResult = @mysql_query($SQLstring, $db_connect); } mysql_close($db_connect); } return ($retval); } function displayForm($First, $Last, $Email, $Login) { global $errorMessage; echo $errorMessage; ?>

First Name:

Last Name:

Your E-Mail:

User Name:

Password:

Confirm Password:



"; $errorCount++; } if ($errorCount == 0) $showForm = FALSE; else $showForm = TRUE; } if ($showForm == TRUE) { if ($errorCount > 0) // if there were errors $errorMessage .= "

Please re-enter the form information below.

\n"; displayForm ($First, $Last, $Email, $Login); } else { // encrypt password //$options = array('cost' => 11); //$password = password_hash($password, PASSWORD_BCRYPT, $options); // create account in db createNewAccount($First,$Last,$Email,$Login,$Password); // send confirmation email $SenderAddress = "$First <$Email>"; $Headers = "From: $SenderAddress\nCC:$SenderAddress\n"; $from = "PVault"; // sender $subject = "PVault Registration Confirmation"; $message = $First . ",\nYou have successfully registered for PVault. Now you can Store your documents in the cloud, securely locked inside your own Personal Vault.\n\nThe PVault Team"; // message lines should not exceed 70 characters (PHP rule), so wrap it $message = wordwrap($message, 70); // send mail mail($Email,$subject,$message,"From: $from\n"); echo "

" . $First . "\nyour account has been created. Welcome to PVault!.



\n"; include 'includes/inc_text_menu.php'; } ?>