Open a New Account


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; // figure out how to make a checkbox for savings or checking in this form. ?>

Initial Deposit:

Account Type:



1) echo "You already have two accounts open. Each user is limited to two accounts."; else { $showForm = TRUE; if (isset($_POST['Submit'])) { $balance = validateInput($_POST['balance'],"Initial Deposit"); $accountType = validateInput($_POST['accountType'],"Account Type"); // gotta finish coding all this stuff below. if($Login == $Password) { $errorMessage .= "Password cannot be the same as user name
"; $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 (); } else { // create account in db createNewAccount($userName,$balance,$accountType); echo "

Your account has been created!.



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