Unknown Coding Problem

This is the code from my first function; I got it from a tutorial, but it still won’t work…

HTML

"You Better Pay Up" Loan Services

Welcome to "You Better Pay Up" Loan Services

You pay us ten percent every week, or else. My hovercraft costs $

PHP

Loan information <?php $interest_rate = .14; function YouOweMe($cost, $interest_rate) { $weekly_payment = ($cost*$interest_rate); print "You better pay me $$weekly_payment every week, or else!"; } YouOweMe($cost, $interest_rate); ?>

Thank you so much for your help!!

Hey chavad,
You need to get the variables from the form by using $_REQUEST…
So just before you define the interest, add:
[php]
$cost=$_REQUEST[‘cost’];
[/php]
This will get the data sent from the text field you called ‘cost’, and will save it to the variable $cost, which you can use for the YouOweMe() function…
Hope this helps…

Dear Ramanakumar,

This is actually something that I have corrected before, but it never occurred to me this time! Thank you so much!! I really appreciate it :)…

Sponsor our Newsletter | Privacy Policy | Terms of Service