NEED HELP TONIGHT!!! OR I WILL LOSE MY JOB!!!!

I need help with this ASAP!!! I pretty sure my boss will fire me if I can not figure this out tonight… PLEASE HELP! I am a graphic designer and not a programmer… but my boss doesn’t know the difference and will not listen. PLEASE HELP ME!!!

My form will not display the echoed message (“Please fill in all required (*) feilds”, “Maximum length for username is 25 characters”, etc.) when I hit submit…

It wouldn’t even show the variables when I tried to just have the form only echo the various strings… nothing appeared… the only way I could get the string values to appear was through a array like this:

[php] if(is_array($_POST)){
echo ‘

’;
print_r($_POST);
echo ‘
’;
}[/php]

^^This returned the data fine… but when I try to echo on particular string and not using the array, nothing appears… This is crucial as this is how the custom error messages are displayed…

Here is my PHP code:

[code]<?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.";

}

?>

Doctor Brownshoes | About Us | Our Company

    <!--------- BASIC ACCOUNT INFO --------->   

    <div class="formSectionWrapper">
        <div id="sectionBar">Create Your FREE Account</div>
        <div class="disclaimerText">
            <span style="font-weight:bold">* Required information |</span> While the other feilds are not mandatory to create an account, in order to best serve our clients individualized needs as a client, please complete the requested information.  We take your privacy very seriously and do not sell or distribute the data we collect. Your information will remain confidential.
        </div>
        
        <div class="width_311px">
            <label>Create a Username <span style="color: #c2773d">*</span></label><br />
            <input class='width_311px' type='text' name='username' maxlength="25">
        </div><!---width_311px--->
        
        <div class="width_311px">    
            <label>Create your Password <span style="color: #c2773d">*</span></label><br />
            <input class='width_311px' type='password' name='password'>
        </div><!---width_311px--->
        
        <div class="width_311px"> 
            <label>Re-Enter your Password <span style="color: #c2773d">*</span></label><br />
            <input class='width_311px' type='password' name='passwordrepeat'>
        </div><!---width_311px--->
        
        <div class="width_311px">   
            <label>E-mail Address <span style="color: #c2773d">*</span></label><br />
            <input class='width_311px' type='text' name='email'>
        </div><!---width_311px--->
        [/code]

Try to use this, as I am not sure what is your submit button name:
change this line:
[php]if ($submit)[/php]
to this:
[php]if ($_SERVER[‘REQUEST_METHOD’]==‘POST’)[/php]

Also, try to change this line:
[php]if ($username&&$password&&$passwordrepeat&&$email&&$emailrepeat&&$career_status&&$first_name&&$last_name)[/php]
so that it look like this:
[php]if ($username!=’’ && $password!=’’ && $passwordrepeat!=’’ && $email!=’’ && $emailrepeat!=’’ && $career_status!=’’ && $first_name!=’’ && $last_name!=’’)[/php]

Then, change this line:
[php]if (strlen($password)>25||(strlen($password)<6))[/php]
to this:
[php]if (strlen($_POST[‘password’])>25||(strlen($_POST[‘password’])<6))[/php]
(because in your code you’re checking password hash, which not make sense)

And finally (probably most important in your case), did you notice you are echo’ing all the error messages ABOVE and tags? You need to move this part of your HTML code above your PHP code:

[code]

Doctor Brownshoes | About Us | Our Company [/code]

Hope this helps.

Sponsor our Newsletter | Privacy Policy | Terms of Service