More Registration Form problems...

I posted earlier about problems with my registration form… I got it to show me the posted variable values using an array… I was originally trying to get it to display this information via the echo command, but the array worked per a suggestion I found here… However, NEW PROBLEM as I am setting this up:

It is supposed to give me “error” messages if I don’t fill out the required fields, the user name exceeds the 25 character limit, etc… BUT it isn’t… I click submit and nothing… no messages. What gives? Thanks in advance! :smiley:

Here is my code:

[php]<?php

$submit = $_POST[‘submit’];

//form data

$username = strip_tags($_POST[‘username’]);
$password = strip_tags($_POST[‘password’]);
$passwordrepeat = strip_tags($_POST[‘passwordrepeat’]);
$email = strip_tags($_POST[‘email’]);
$emailrepeat = strip_tags($_POST[‘emailrepeat’]);
$career_status = strip_tags($_POST[‘career_status’]);
$name_title = strip_tags($_POST[‘name_title’]);
$first_name = strip_tags($_POST[‘first_name’]);
$middle_name = strip_tags($_POST[‘middle_name’]);
$last_name = strip_tags($_POST[‘last_name’]);
$suffix = strip_tags($_POST[‘suffix’]);
$current_address1 = strip_tags($_POST[‘current_address1’]);
$current_address2 = strip_tags($_POST[‘current_address2’]);
$current_city = strip_tags($_POST[‘current_city’]);
$current_state = strip_tags($_POST[‘current_state’]);
$current_zip = strip_tags($_POST[‘current_zip’]);
$phone_home = strip_tags($_POST[‘phone_home’]);
$phone_mobile = strip_tags($_POST[‘phone_mobile’]);
$preferred_contact = strip_tags($_POST[‘preferred_contact’]);
$school_name = strip_tags($_POST[‘school_name’]);
$school_city = strip_tags($_POST[‘school_city’]);
$school_state = strip_tags($_POST[‘school_state’]);
$school_gradYear = strip_tags($_POST[‘school_gradYear’]);
$med_school_debt = strip_tags($_POST[‘med_school_debt’]);
$monthly_debt_payment = strip_tags($_POST[‘monthly_debt_payment’]);
$credit_score = strip_tags($_POST[‘credit_score’]);
$marital_status = strip_tags($_POST[‘marital_status’]);
$current_employer_name = strip_tags($_POST[‘current_employer_name’]);
$current_employer_city = strip_tags($_POST[‘current_employer_city’]);
$current_employer_state = strip_tags($_POST[‘current_employer_state’]);
$current_position = strip_tags($_POST[‘current_position’]);
$current_specialty = strip_tags($_POST[‘current_specialty’]);
$current_employer_startDate_mm = strip_tags($_POST[‘current_employer_startDate_mm’]);
$current_employer_startDate_yyyy = strip_tags($_POST[‘current_employer_startDate_yyyy’]);
$changing_employer = strip_tags($_POST[‘changing_employer’]);
$current_employer_endDate_mm = strip_tags($_POST[‘current_employer_endDate_mm’]);
$current_employer_endDate_yyyy = strip_tags($_POST[‘current_employer_endDate_yyyy’]);
$future_employer_name = strip_tags($_POST[‘future_employer_name’]);
$future_employer_city = strip_tags($_POST[‘future_employer_city’]);
$future_employer_state = strip_tags($_POST[‘future_employer_state’]);
$future_position = strip_tags($_POST[‘future_position’]);
$future_specialty = strip_tags($_POST[‘future_specialty’]);
$future_employer_startDate_mm = strip_tags($_POST[‘future_employer_startDate_mm’]);
$future_employer_startDate_yyyy = strip_tags($_POST[‘future_employer_startDate_yyyy’]);
$destination_city = strip_tags($_POST[‘destination_city’]);
$destination_state = strip_tags($_POST[‘destination_state’]);
$move_date_mm = strip_tags($_POST[‘move_date_mm’]);
$move_date_yyyy = strip_tags($_POST[‘move_date_yyyy’]);
$prop_single_family = strip_tags($_POST[‘prop_single_family’]);
$prop_townhouse = strip_tags($_POST[‘prop_townhouse’]);
$prop_condo = strip_tags($_POST[‘prop_condo’]);
$prop_co_op = strip_tags($_POST[‘prop_co_op’]);
$prop_duplex = strip_tags($_POST[‘prop_duplex’]);
$prop_mobile = strip_tags($_POST[‘prop_mobile’]);
$prop_other = strip_tags($_POST[‘prop_other’]);
$num_bedrooms = strip_tags($_POST[‘num_bedrooms’]);
$num_bath = strip_tags($_POST[‘num_bath’]);
$price_low = strip_tags($_POST[‘price_low’]);
$price_high = strip_tags($_POST[‘price_high’]);
$prop_purpose = strip_tags($_POST[‘prop_purpose’]);
$need_realtor = strip_tags($_POST[‘need_realtor’]);
$need_lender = strip_tags($_POST[‘need_lender’]);
$need_refinance_NoCash = strip_tags($_POST[‘need_refinance_NoCash’]);
$need_refinance_TakeCash = strip_tags($_POST[‘need_refinance_TakeCash’]);
$need_home_equity = strip_tags($_POST[‘need_home_equity’]);
$need_commercial = strip_tags($_POST[‘need_commercial’]);
$need_practice = strip_tags($_POST[‘need_practice’]);
$mortgage_needs = strip_tags($_POST[‘mortgage_needs’]);
$most_important = strip_tags($_POST[‘most_important’]);
$keep_property_time = strip_tags($_POST[‘keep_property_time’]);
$keep_mortgage_time = strip_tags($_POST[‘keep_mortgage_time’]);
$program_foundHome_lowDown_NoPMI = strip_tags($_POST[‘program_foundHome_lowDown_NoPMI’]);
$program_foundHome_20down_bestRate = strip_tags($_POST[‘program_foundHome_20down_bestRate’]);
$program_foundHome_20down_specializedLender = strip_tags($_POST[‘program_foundHome_20down_specializedLender’]);
$program_preapproved_physLoan = strip_tags($_POST[‘program_preapproved_physLoan’]);
$program_preapproved_coventionalLoan = strip_tags($_POST[‘program_preapproved_coventionalLoan’]);
$program_lenderBailed = strip_tags($_POST[‘program_lenderBailed’]);
$program_poorCredit = strip_tags($_POST[‘program_poorCredit’]);
$referral_source = strip_tags($_POST[‘referral_source’]);
$registration_date = date(“Y-m-d”);

if ($submit)
{
//check that required fields are completed
if ($username&&$password&&$passwordrepeat&&$email&&$emailrepeat&&$career_status&&$first_name&&$last_name)
{
//encrypt password
$password = md5($password);
$passwordrepeat = md5($passwordrepeat);

	if ($password==$passwordrepeat)
	{
		//check character length of username and 
		if  (strlen($username)>25)
		{
			echo "Maximum length for username is 25 characters.";
		}
		else
		{
			
			//check password length
			if (strlen($password)>25||strlen($password)<6)
			{
				echo "Password must be between 6 and 25 characters in length.";
			}
			else 
			{
				//register the user
				
				echo "Success!";
			
			}
		}
	}
	else
		echo "Your passwords do not match. Please re-enter and hit submit again.";

}
else
	echo "Please fill in all required (*) feilds.";

}

?>[/php]


Here is my form on my server:

http://www.mysite.com/testPHP/registration.php

Sponsor our Newsletter | Privacy Policy | Terms of Service