Registration Form testing problem

am setting up a registration form and I am wanted to test that my page was successfully reading my entered data by running:
[php]if ($submit)
{

echo “$username/$password/$passwordrepeat/$email/$emailrepeat”;

}[/php]

When I click submit, it is not showing the echoed data…

Here is my PHP script:

[php]<?php

$submit = $_POST[‘sumbit’];

//form data

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

if ($submit)
{

echo “$username/$password/$passwordrepeat/$email/$emailrepeat”;

}

?>[/php]

You can take a look at the HTML code going to this site and hitting “View Page Source” in your browser: http://www.mysite.com/staging/registration.php

Check your spelling of word submit here:
[php]$submit = $_POST[‘sumbit’];[/php]

I was all excited and thought that would fix the problem, but no… still no data showing up…

Well, then try to echo all the $_POST array:
[php]<?php
if(is_array($_POST)){
echo ‘

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

Where do I place this code? thank! :smiley:

That worked!

But why did the earlier echo script not work I wonder?

am setting up a registration form and I am wanted to test that my page was successfully reading my entered data by running:
Just in place of this code where you test. This is for debugging to see what data was posted by your form.

YaY! It worked!

Sponsor our Newsletter | Privacy Policy | Terms of Service