Hi Good day,
I’m a web designer. I know html css and a little javascript and now I want to learn php.
my goal is to make “get a qoute” form for my website.
I want things to be calculated upon filling the form. here’s the code I come up with, no html structure yet. I just want to see if it works. but i didn’t
[php]
$page = 5;
$purpose = 4;
$hostDom = 2;
$qoute;
function total()
{
function MyPage()
{
global $page,$qoute;
if(page >= 5)
{
$qoute = $qoute + 3000;
}
}
function MyPurpose()
{
global $purpose,$qoute;
if(purpose = 4)
{
$qoute = $qoute + 3500;
}
}
function MyhostDom()
{
global $hostDom,$qoute;
if(hostDom = 1)
{
$qoute = $qoute + 1000;
}
if else((hostDom = 2)
{
$qoute = $qoute + 3000;
}
}
echo $qoute;
}
total();
[/php]
i just want to print out the total qoute.
please help.
Thanks!