That problem is fixed, now i'm setting up a membership database. Here are the two files that i have... the actual page is at
http://www2.truman.edu/~d1514/Members/profile.php
it should make you login first use test:test
the script to put the data in the databse brothers looks like the attached file
<?
include 'db.php';
// Define post fields into simple variables
$fname = $POST['fname'];
$lname = $POST['lname'];
$IN = $POST['IN'];
$major = $POST['major'];
$year = $POST['year'];
$email = $POST['email'];
$address1 = $POST['address1'];
$address2 = $POST['address2'];
$phone = $POST['phone'];
$big = $POST['big'];
$little = $POST['little'];
$birthdate = $POST['birthdate'];
$pledge = $_POST['pledge'];
/ Let's strip some slashes in case the user enteredany escaped characters. /
$fname = stripslashes($fname);
$lname = stripslashes($lname);
$email = stripslashes($email);
$username = stripslashes($birthdate);
/ Do some error checking on the form posted fields /
if((!$fname) || (!$lname) || (!$email) || (!$address1) || (!$birthdate) || (!$IN))
{ echo 'You did not submit the following required information! <br />';
if(!$fname){
echo "First Name is a required field. Please enter it below.<br />"; }
if(!$lname){
echo "Last Name is a required field. Please enter it below.<br />"; }
if(!$email){
echo "Email Address is a required field. Please enter it below.<br />"; }
if(!$address1){
echo "Address is a required field. Please enter it below.<br/>"; }
if(!$birthdate){
echo "Birthdate is a required field. Please enter it below.<br />"; } }
if(!$IN){
echo "IN number is a required field. Please enter it below.<br />"; }
include 'profile.php';
// Show the form again!
/ End the error checking and if everything is ok, we'll move on to creating the user account /
exit();
// if the error checking has failed, we'll exit the script!
}
/ Let's do some checking and ensure that the user's email address or username does not exist in the database /
$sql_email_check = mysql_query("SELECT email FROM brothers WHERE email='$email'");
$sql_IN_check = mysql_query("SELECT IN FROM brothers WHERE IN='$IN'");
$email_check = mysql_num_rows($sql_email_check);
$IN_check = mysql_num_rows($sql_IN_check);
if(($email_check > 0) || ($IN_check > 0)){
echo "Please fix the following errors: <br />";
if($email_check > 0){
echo "<strong>Your email address has already been used by another member in our database.
Please submit a different Email address!<br />";
unset($email); }
if($IN_check > 0){
echo "The IN number you have selected has already been used by another member in our database.
Please choose a different Username!<br />";
unset($IN); }
include 'profile.php';
// Show the form again!
exit();
// exit the script so that we do not create this account!
}
/ Everything has passed both error checks that we have done.It's time to create the account! /
// Enter info into the Database.
$sql = mysql_query("INSERT INTO brothers (fname, lname, IN, email, address1, address2, phone, big, little, birthdate, pledge )
VALUES('$fname', '$lname', '$IN', '$email', '$address1', '$address2', '$phone', '$big'. '$little', '$birthdate', '$pledge')"
) or die (mysql_error(can not connect to the database)));
if(!$sql)
{ echo 'There has been an error creating your account. Please contact the webmaster.';}
else {
$userid = mysql_insert_id();
?>
Sorry this is so long but i couldn't figure out how to take an image of the screen. Thanks for all the help so far for some reason this doesn't put the information in the database.