hi need a hand here..

im having trouble in making my code work(well actually im not getting it)what i need to do is to compute the rate of vehicle that is rented..the only thing that i came up is with the perday rate and the other 2 i cant find a way(i really sucks with formula )here is the thing..

SELF - DRIVE RATES

1. Minimum rental periods :
Daily - 24 hours
Weekly - 7 days
Monthly - 30 days

CAR
Toyota VIOS 1.3 MT
DAILY
2,500

WEEKLY
15,000

MONTHLY
52,500

and this is the code that i can came up

<?php
\$rday=\$_POST['txtrday'];
\$pday=\$_POST['txtpday'];
\$vehicle;

\$phr;
\$total;
\$totalhr;
\$pday;
\$totald;
\$totalday;
\$rmonth;
\$pmonth;
\$totalm;
\$totalmonth;

if(\$vehicle=="Toyota VIOS 1.3 MT")
{
\$perday=2500;
\$permonth=52500;
\$perweek=15000;

if(\$rday>\$pday)
{
\$totald=(\$rday)-(\$pday);

}
else if(\$rday==\$pday)
{
\$totalday=\$perday;
}

if(\$rmonth>\$pmonth)
{
\$totalm=\$rmonth-\$pmonth;

}
else if(\$rmonth==\$pmonth)
{
\$totalmonth;
}

\$totalday=\$perday * \$totald+2500;
\$totalmonth=\$totalm * \$permonth;
\$rate=\$totalday + \$totalmonth;
}
?>

this will be the weekly rate output

e.g
form1
vehicle=Toyota VIOS 1.3 MT
pday=3
rday=10
when click submit it will be directed in

form2

rate=15000

because it is already equivalent to 7 days

in need of lot of help right now ..this will be the last part of my project so please

this are the screenshot output