Old 24-01-2007, 20:37   #1 (permalink)
shakey
Senior Member
 
shakey's Avatar
 
Join Date: Jan 2007
Location: adelaide, australia
Posts: 120
PHP form

hey im in a pickle here,, i am totally new to PHP so theres prolly an obvious solution..

i have a form http://www.freeupcash.com.au/form.html and some PHP http://www.freeupcash.com.au/mailout.php that arent talking properly...

i get a msg saying there's an error on line 32

PLEEEEEEEEEASE help!
anything would be appreciated...

Last edited by shakey : 24-01-2007 at 20:55.
  Reply With Quote
Old 24-01-2007, 20:50   #2 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
Holy shit. That's a form indeed!

Doesn't seem terribly secure for me to be able to download your PHP script...that shouldn't happen.

Line 32: $other_mortgage_repayments = $_POST['other_mortgage_repayments'];

That input is on your form, so I have no clue.

And there's no error checking whatsoever? Get ready for header injection and SPAM!
  Reply With Quote
Old 24-01-2007, 21:01   #3 (permalink)
shakey
Senior Member
 
shakey's Avatar
 
Join Date: Jan 2007
Location: adelaide, australia
Posts: 120
Quote:
Originally Posted by pgo
That's a form indeed!

haha yeah,, i had this php punk help me with it and i kept asking him shouldnt there be an easier way? lol i think there would be.. then again, he couldnt solve this error,, some punk

regarding security,, what are the actual issues? i figured the worst case scenario is someone downloading the code and getting the address.. are there more serious issues ive overlooked?
  Reply With Quote
Old 25-01-2007, 04:07   #4 (permalink)
BasicMind
Senior Member
 
Join Date: Jan 2007
Location: Edinburgh
Posts: 197
it downloads because you havent got php running on your server. or you dont have .php in apache setup. no checking of cookie or ip scan to stop people repeatedly sending you spam. ouch.

I cant see an syntax errors on or arround line 32. could you post the full error.
  Reply With Quote
Old 25-01-2007, 04:13   #5 (permalink)
BasicMind
Senior Member
 
Join Date: Jan 2007
Location: Edinburgh
Posts: 197
that form is a killer, I'm glad I dont do php anymore.

this will bring up a webpage to the user showing them all the information they just added in.

and its commen to open up php scripts using <?php not <? proberly not your error though
  Reply With Quote
Old 29-01-2007, 08:53   #6 (permalink)
shakey
Senior Member
 
shakey's Avatar
 
Join Date: Jan 2007
Location: adelaide, australia
Posts: 120
im in the process of upgrading the web package to include php support,, which btw i think is a bit of a gip.. hosting should come with php by default.

however there is still an error on line 32 so if anyone feel like trolling through this mess PLEASE do!

back soon
  Reply With Quote
Old 29-01-2007, 22:50   #7 (permalink)
pojo
Registered User
 
Join Date: Jan 2007
Posts: 6
edit: before you do anything, replace the short tags (<?) with <?php







might be this part

$body = <<<HTML

*** {$name} has submitted his/her info from your website **

title: {$title}\n
first name: {$first_name}\n
surname: {$surname}\n
phone: {$phone}\n
mobile: {$mobile}\n
fax: {$fax}\n
email: {$email}\n
applicant type: {$applicant_type}\n
customer type: {$customer_type}\n
number of applicants: {$number_of_applicants}\n
dependants: {$dependants}\n
loan fo_r own home: {$loan_for_own_home}\n
loan fo_r investment: {$loan_for_investment}\n
total value of properties: {$total_value_of_properties}\n
first home owner: {$first_home_owner}\n
term of loan: {$term_of_loan}\n
other mortgage repayments: {$other_mortgage_repayments}\n
other mortgage repayments per: {$other_mortgage_repayments_per}\n
ongoing rental payments: {$ongoing_rental_payments}\n
ongoing rental payments per: {$ongoing_rental_payments_per}\n
repayments on personal loans: ($repayments_on_personal_loans}\n
repayments on personal loans_per: {$repayments_on_personal_loans_per}\n
repayments on car loans: {$repayments_on_car_loans}\n
repayments on car loans per: {$repayments_on_car_loans_per}\n
family support payments: {$family_support_payments}\n
family support payments per: {$family_support_payments_per}\n
any other commitments: {$any_other_commitments}\n
any other commitments per: {$any_other_commitments_per}\n
store card limits: {$store_card_limits}\n
store card limits per: {$store_card_limits_per}\n
credit card limits: {$credit_card_limits}\n
credit card limits per: {$credit_card_limits_per}\n
PAYG or director salary: {$PAYG_slash_director_salary}\n
PAYG or director salary per: {$PAYG_slash_director_salary_per}\n
rental income sec property: {$rental_income_sec_property}\n
rental income sec property per: {$rental_income_sec_property_per}\n
rental income other property: {$rental_income_other_property}\n
rental income other property per: {$rental_income_other_property_per}\n
commissions: {$commissions}\n
commissions per: {$commissions_per}\n
bonus: {$bonus}\n
bonus per: {$bonus_per}\n
net profit: {$net_profit}\n
net profit per: {$net_profit_per}\n
DSS pension: {$DSS_pension}\n
DSS pension per: {$DSS_pension_per}\n
child support: {$child_support}\n
child support per: {$child_support_per}\n
depreciation etc: {$depreciation_etc}\n
depreciation etc per: {$depreciation_etc_per}\n
nontaxable income: {$nontaxable_income}\n
nontaxable income per: {$nontaxable_income_per}\n
other taxable income: {$other_taxable_income}\n
other taxable income per: {$other_taxable_income_per}\n
overtime: {$overtime}\n
overtime per: {$overtime_per}\n
annuities: {$annuities}\n
annuities_per: {$annuities_per}\n
income from super: {$income_from_super}\n
income from super per: {$income_from_super_per}\n
interest income: {$interest_income}\n
interest income per: {$interest_income_per}\n
dividends: {$dividends}\n
dividends per: {$dividends_per}\n
naval allowance: {$naval_allowance}\n
naval allowance per: {$naval_allowance_per}\n
tax deductions: {$tax_deductions}\n
tax deductions_per: {$tax_deductions_per}\n
first description: {$description_1}\n
first card type: {$card_type_1}\n
first card limit: {$limit_1}\n
first cards amount owing: {$owing_1}\n
first cards monthly repayments: {$monthly_repayments_1}\n
yes to refinance yes: {$refinance_yes_1}\n
no to refinance: {$refinance_no_1}\n
first institution: {$institution_1}\n
second description: {$description_2}\n
second card type: {$card_type_2}\n
second card limit: {$limit_2}\n
second cards amount owing: {$owing_2}\n
second cards monthly repayments: {$monthly_repayments_2}\n
yes to refinance yes: {$refinance_yes_2}\n
no to refinance: {$refinance_no_2}\n
second institution: {$institution_2}\n
third description: {$description_3}\n
third card type: {$card_type_3}\n
third card limit: {$limit_3}\n
third cards amount owing: {$owing_3}\n
third cards monthly repayments: {$monthly_repayments_3}\n
yes to refinance yes: {$refinance_yes_3}\n
no to refinance: {$refinance_no_3}\n
third institution: {$institution_3}\n
other assets and liabilities_1: {$other_assets_liabilities_1}\n
value of assets etc_1: {$value_1}\n
amountowing on assets and liabilities_1: {$assets_liabilities_owing_1}\n
monthly repayments on assets and liabilities_1: {$assets_liabilities_monthly_repayments_1}\n
yes to refinance_1: {$refinance_yes_1}\n
no to refinance_1: {$refinance_no_1}\n
institution_1: {$other_institution_1}\n
other assets and liabilities_2: {$other_assets_liabilities_2}\n
value of assets etc_2: {$value_2}\n
amountowing on assets and liabilities_2: {$assets_liabilities_owing_2}\n
monthly repayments on assets and liabilities_2: {$assets_liabilities_monthly_repayments_2}\n
yes to refinance_2: {$refinance_yes_2}\n
no to refinance_2: {$refinance_no_2}\n
institution_2: {$other_institution_2}\n
other assets and liabilities_3: {$other_assets_liabilities_3}\n
value of assets etc_3: {$value_3}\n
amountowing on assets and liabilities_3: {$assets_liabilities_owing_3}\n
monthly repayments on assets and liabilities_3: {$assets_liabilities_monthly_repayments_3}\n
yes to refinance_3: {$refinance_yes_3}\n
no to refinance_3: {$refinance_no_3}\n
institution_3: {$other_institution_3}\n
description of first vehicle: {$vehicle_description_1}\n
value of first vehicle: {$vehicle_value_1}\n
amount owing on first vehicle: {$vehicle_owing_1}\n
monthly repayments on first vehicle: {$vehicle_monthly_repayments_1}\n
yes to a refinance on first vehicle: {$vehicle_refinance_yes_1}\n
no to a refinance on first vehicle: {$vehicle_refinance_no_1}\n
first vehicle lender: {$vehicle_current_lender_1}\n
description of second vehicle: {$vehicle_description_2}\n
value of second vehicle: {$vehicle_value_2}\n
amount owing on second vehicle: {$vehicle_owing_2}\n
monthly repayments on second vehicle: {$vehicle_monthly_repayments_2}\n
yes to a refinance on second vehicle: {$vehicle_refinance_yes_2}\n
no to a refinance on second vehicle: {$vehicle_refinance_no_2}\n
second vehicle lender: {$vehicle_current_lender_2}\n
description of third vehicle: {$vehicle_description_3}\n
value of third vehicle: {$vehicle_value_3}\n
amount owing on third vehicle: {$vehicle_owing_3}\n
monthly repayments on third vehicle: {$vehicle_monthly_repayments_3}\n
yes to a refinance on third vehicle: {$vehicle_refinance_yes_3}\n
no to a refinance on third vehicle: {$vehicle_refinance_no_3}\n
third vehicle lender: {$vehicle_current_lender_3}\n
HTML;

try replacing it with

echo ("*** {$name} has submitted his/her info from your website **

title: {$title}\n
first name: {$first_name}\n
surname: {$surname}\n
phone: {$phone}\n
mobile: {$mobile}\n
fax: {$fax}\n
email: {$email}\n
applicant type: {$applicant_type}\n
customer type: {$customer_type}\n
number of applicants: {$number_of_applicants}\n
dependants: {$dependants}\n
loan fo_r own home: {$loan_for_own_home}\n
loan fo_r investment: {$loan_for_investment}\n
total value of properties: {$total_value_of_properties}\n
first home owner: {$first_home_owner}\n
term of loan: {$term_of_loan}\n
other mortgage repayments: {$other_mortgage_repayments}\n
other mortgage repayments per: {$other_mortgage_repayments_per}\n
ongoing rental payments: {$ongoing_rental_payments}\n
ongoing rental payments per: {$ongoing_rental_payments_per}\n
repayments on personal loans: ($repayments_on_personal_loans}\n
repayments on personal loans_per: {$repayments_on_personal_loans_per}\n
repayments on car loans: {$repayments_on_car_loans}\n
repayments on car loans per: {$repayments_on_car_loans_per}\n
family support payments: {$family_support_payments}\n
family support payments per: {$family_support_payments_per}\n
any other commitments: {$any_other_commitments}\n
any other commitments per: {$any_other_commitments_per}\n
store card limits: {$store_card_limits}\n
store card limits per: {$store_card_limits_per}\n
credit card limits: {$credit_card_limits}\n
credit card limits per: {$credit_card_limits_per}\n
PAYG or director salary: {$PAYG_slash_director_salary}\n
PAYG or director salary per: {$PAYG_slash_director_salary_per}\n
rental income sec property: {$rental_income_sec_property}\n
rental income sec property per: {$rental_income_sec_property_per}\n
rental income other property: {$rental_income_other_property}\n
rental income other property per: {$rental_income_other_property_per}\n
commissions: {$commissions}\n
commissions per: {$commissions_per}\n
bonus: {$bonus}\n
bonus per: {$bonus_per}\n
net profit: {$net_profit}\n
net profit per: {$net_profit_per}\n
DSS pension: {$DSS_pension}\n
DSS pension per: {$DSS_pension_per}\n
child support: {$child_support}\n
child support per: {$child_support_per}\n
depreciation etc: {$depreciation_etc}\n
depreciation etc per: {$depreciation_etc_per}\n
nontaxable income: {$nontaxable_income}\n
nontaxable income per: {$nontaxable_income_per}\n
other taxable income: {$other_taxable_income}\n
other taxable income per: {$other_taxable_income_per}\n
overtime: {$overtime}\n
overtime per: {$overtime_per}\n
annuities: {$annuities}\n
annuities_per: {$annuities_per}\n
income from super: {$income_from_super}\n
income from super per: {$income_from_super_per}\n
interest income: {$interest_income}\n
interest income per: {$interest_income_per}\n
dividends: {$dividends}\n
dividends per: {$dividends_per}\n
naval allowance: {$naval_allowance}\n
naval allowance per: {$naval_allowance_per}\n
tax deductions: {$tax_deductions}\n
tax deductions_per: {$tax_deductions_per}\n
first description: {$description_1}\n
first card type: {$card_type_1}\n
first card limit: {$limit_1}\n
first cards amount owing: {$owing_1}\n
first cards monthly repayments: {$monthly_repayments_1}\n
yes to refinance yes: {$refinance_yes_1}\n
no to refinance: {$refinance_no_1}\n
first institution: {$institution_1}\n
second description: {$description_2}\n
second card type: {$card_type_2}\n
second card limit: {$limit_2}\n
second cards amount owing: {$owing_2}\n
second cards monthly repayments: {$monthly_repayments_2}\n
yes to refinance yes: {$refinance_yes_2}\n
no to refinance: {$refinance_no_2}\n
second institution: {$institution_2}\n
third description: {$description_3}\n
third card type: {$card_type_3}\n
third card limit: {$limit_3}\n
third cards amount owing: {$owing_3}\n
third cards monthly repayments: {$monthly_repayments_3}\n
yes to refinance yes: {$refinance_yes_3}\n
no to refinance: {$refinance_no_3}\n
third institution: {$institution_3}\n
other assets and liabilities_1: {$other_assets_liabilities_1}\n
value of assets etc_1: {$value_1}\n
amountowing on assets and liabilities_1: {$assets_liabilities_owing_1}\n
monthly repayments on assets and liabilities_1: {$assets_liabilities_monthly_repayments_1}\n
yes to refinance_1: {$refinance_yes_1}\n
no to refinance_1: {$refinance_no_1}\n
institution_1: {$other_institution_1}\n
other assets and liabilities_2: {$other_assets_liabilities_2}\n
value of assets etc_2: {$value_2}\n
amountowing on assets and liabilities_2: {$assets_liabilities_owing_2}\n
monthly repayments on assets and liabilities_2: {$assets_liabilities_monthly_repayments_2}\n
yes to refinance_2: {$refinance_yes_2}\n
no to refinance_2: {$refinance_no_2}\n
institution_2: {$other_institution_2}\n
other assets and liabilities_3: {$other_assets_liabilities_3}\n
value of assets etc_3: {$value_3}\n
amountowing on assets and liabilities_3: {$assets_liabilities_owing_3}\n
monthly repayments on assets and liabilities_3: {$assets_liabilities_monthly_repayments_3}\n
yes to refinance_3: {$refinance_yes_3}\n
no to refinance_3: {$refinance_no_3}\n
institution_3: {$other_institution_3}\n
description of first vehicle: {$vehicle_description_1}\n
value of first vehicle: {$vehicle_value_1}\n
amount owing on first vehicle: {$vehicle_owing_1}\n
monthly repayments on first vehicle: {$vehicle_monthly_repayments_1}\n
yes to a refinance on first vehicle: {$vehicle_refinance_yes_1}\n
no to a refinance on first vehicle: {$vehicle_refinance_no_1}\n
first vehicle lender: {$vehicle_current_lender_1}\n
description of second vehicle: {$vehicle_description_2}\n
value of second vehicle: {$vehicle_value_2}\n
amount owing on second vehicle: {$vehicle_owing_2}\n
monthly repayments on second vehicle: {$vehicle_monthly_repayments_2}\n
yes to a refinance on second vehicle: {$vehicle_refinance_yes_2}\n
no to a refinance on second vehicle: {$vehicle_refinance_no_2}\n
second vehicle lender: {$vehicle_current_lender_2}\n
description of third vehicle: {$vehicle_description_3}\n
value of third vehicle: {$vehicle_value_3}\n
amount owing on third vehicle: {$vehicle_owing_3}\n
monthly repayments on third vehicle: {$vehicle_monthly_repayments_3}\n
yes to a refinance on third vehicle: {$vehicle_refinance_yes_3}\n
no to a refinance on third vehicle: {$vehicle_refinance_no_3}\n
third vehicle lender: {$vehicle_current_lender_3}\n");
  Reply With Quote
Old 31-01-2007, 00:50   #8 (permalink)
shakey
Senior Member
 
shakey's Avatar
 
Join Date: Jan 2007
Location: adelaide, australia
Posts: 120
POJO YOU ARE A LEGEND!!!!!!!!!!!!

thank you so much! much appreciated
  Reply With Quote
Old 31-01-2007, 01:07   #9 (permalink)
shakey
Senior Member
 
shakey's Avatar
 
Join Date: Jan 2007
Location: adelaide, australia
Posts: 120
i added the <?php opening tag, and echo before the astris' and semi-colon and end bracket at the end of the script. the code is updated at http://www.freeupcash.com.au/mailout.php still not being however an upgrade is on the way,,

i need to fine tune the form so that the recipient (my boss) can understand the form results and not lose clients etc

the email returned from the form was as follows: (i didnt fill it out; just hit submit)

Quote:
// old code: *** has submitted his/her info from your website **

echo ("*** has submitted his/her info from your website **

title: -

first name:

surname:

phone:

mobile:

fax:

email:

applicant type: ?

customer type: ?

number of applicants:

dependants:

loan fo_r own home:

loan fo_r investment:

total value of properties:

first home owner:

term of loan:

other mortgage repayments:

other mortgage repayments per: weekly

ongoing rental payments:

ongoing rental payments per: weekly

repayments on personal loans: (}

repayments on personal loans_per: weekly

repayments on car loans:

repayments on car loans per: weekly

family support payments:

family support payments per: weekly

any other commitments:

any other commitments per: weekly

store card limits:

store card limits per: weekly

credit card limits:

credit card limits per: weekly

PAYG or director salary: $0

PAYG or director salary per: weekly

rental income sec property: $0

rental income sec property per: weekly

rental income other property: $0

rental income other property per: weekly

commissions: $0

commissions per: weekly

bonus: $0

bonus per: weekly

net profit: $0

net profit per: weekly

DSS pension: $0

DSS pension per: weekly

child support: $0

child support per: weekly

depreciation etc: $0

depreciation etc per: weekly

nontaxable income: $0

nontaxable income per: weekly

other taxable income: $0

other taxable income per: weekly

overtime: $0

overtime per: weekly

annuities: $0

annuities_per: weekly

income from super: $0

income from super per: weekly

interest income: $0

interest income per: weekly

dividends: $0

dividends per: weekly

naval allowance: $0

naval allowance per: weekly

tax deductions: $0

tax deductions_per: weekly

first description:

first card type: Visa

first card limit: $

first cards amount owing: $

first cards monthly repayments: $

yes to refinance yes:

no to refinance:

first institution: ?

second description:

second card type:

second card limit:

second cards amount owing:

second cards monthly repayments:

yes to refinance yes:

no to refinance:

second institution: ?

third description:

third card type:

third card limit:

third cards amount owing:

third cards monthly repayments:

yes to refinance yes:

no to refinance:

third institution: ?

other assets and liabilities_1: Cash

value of assets etc_1: $

amountowing on assets and liabilities_1: $

monthly repayments on assets and liabilities_1: $

yes to refinance_1:

no to refinance_1:

institution_1: ?

other assets and liabilities_2: Cash

value of assets etc_2: $

amountowing on assets and liabilities_2: $

monthly repayments on assets and liabilities_2: $

yes to refinance_2:

no to refinance_2:

institution_2: ?

other assets and liabilities_3: Cash

value of assets etc_3: $

amountowing on assets and liabilities_3: $

monthly repayments on assets and liabilities_3: $

yes to refinance_3:

no to refinance_3:

institution_3: ?

description of first vehicle:

value of first vehicle: $

amount owing on first vehicle: $

monthly repayments on first vehicle: $

yes to a refinance on first vehicle:

no to a refinance on first vehicle:

first vehicle lender:

description of second vehicle:

value of second vehicle: $

amount owing on second vehicle: $

monthly repayments on second vehicle: $

yes to a refinance on second vehicle:

no to a refinance on second vehicle:

second vehicle lender:

description of third vehicle:

value of third vehicle: $

amount owing on third vehicle: $

monthly repayments on third vehicle: $

yes to a refinance on third vehicle:

no to a refinance on third vehicle:

third vehicle lender:
");

Last edited by shakey : 31-01-2007 at 01:30.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8