User Registration Form

Back to login

\n"; $email_address_valid = false; } if ($password != $confirm_password) { $password_match = false; } if ($username != "" && $password != "" && $confirm_password != "" && $fname != "" && $lname != "" && $email_address_valid) { // Need to insert some SQL here to add the person's details $sql_insert = "INSERT INTO ".USERS_TABLE." (username, password, email, country, institution, fname, lname) VALUES ('$username', '$password', '$email', '$country', '$institution', '$fname', '$lname')"; $link = db_connect_admin(); echo "query = $sql_insert
\n"; mysql_query($sql_insert); echo "Records added = " . mysql_affected_rows() . "
\n"; if (mysql_affected_rows() > 0) { mail(REGISTRATION_ADMIN_EMAIL, "Data archive registration: $fname $lname", "$fname $lname has requested for an account for the data archiving system.\n This person's details are as follows:\n Name: $fname $lname\n Username: $username\n Email: $email\n Country: $country\n Institution: $institution\n To allow this person, please login to ".DATA_ARCHIVE_URL."/admin.html, click the \"Unregistered Users\" tab and register this person\n"); // Set the non-mandatory fields to nbsp; if they are not filled out if ($country == "") { $country = " "; } if ($institution == "") { $institution = " "; } echo "Thankyou. Your registration will be confirmed via email if successful.

Your details
Username: $username
First name: $fname
Last name: $lname
Email: $email
Country: $country
Institution: $institution
\n"; } else { echo "Username $username already exists. Please choose another username
\n"; } mysql_close($link); } else { ?>
* Mandatory fields
Create New Login
* Username: ";} else { echo "> Required"; }?>
* Password: Required"; }?>
* Confirm Password: Passwords don't match\n"; } ?>
User Details
* First Name: ";} else { echo "> Required"; }?>
* Last Name: ";} else { echo "> Required"; }?>
* Email Address: Invalid email address";} else if ($email == "") { echo "> Required"; } else {echo "value=\"$email\" >";}?>
Country:
Institution: