From 10415035022fc1c04db809dd9e5506717d81b6d4 Mon Sep 17 00:00:00 2001 From: Ed Kraus Date: Fri, 5 Jun 2009 19:18:07 +0000 Subject: [PATCH] Added City, State, Country, Phone and error's #2 git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@538 c66351dc-e62f-0410-b875-e3a5c0b9693f --- site/login/login/register-exec.php | 134 ++++++++++++++++++++++++++ site/login/login/register-form.php | 75 ++++++++++++++ site/login/login/register-success.php | 12 +++ 3 files changed, 221 insertions(+) create mode 100644 site/login/login/register-exec.php create mode 100644 site/login/login/register-form.php create mode 100644 site/login/login/register-success.php diff --git a/site/login/login/register-exec.php b/site/login/login/register-exec.php new file mode 100644 index 00000000..3fdb61ab --- /dev/null +++ b/site/login/login/register-exec.php @@ -0,0 +1,134 @@ + 0) { + $errmsg_arr[] = 'Login ID already in use'; + $errflag = true; + } + @mysql_free_result($result); + } + else { + die("Query failed"); + } + } + + + //If there are input validations, redirect back to the registration form + if($errflag) { + $_SESSION['ERRMSG_ARR'] = $errmsg_arr; + session_write_close(); + header("location: register-form.php"); + exit(); + } + + //Create INSERT query + $qry = "INSERT INTO members(firstname, lastname, city, state, country, phone, email, login, passwd) VALUES('$fname','$lname', '$city','$state', '$country', '$phone', '$email', '$login','".md5($_POST['password'])."')"; + $result = @mysql_query($qry); + + //Check whether the query was successful or not + if($result) { + header("location: register-success.php"); + exit(); + }else { + die("Query failed"); + } +?> \ No newline at end of file diff --git a/site/login/login/register-form.php b/site/login/login/register-form.php new file mode 100644 index 00000000..1b8b2f7b --- /dev/null +++ b/site/login/login/register-form.php @@ -0,0 +1,75 @@ + + + + + +Login Form + + + +0 ) { + echo '