Jaynesh
04-05-2006, 05:43 PM
Im making a Quote generator.
Ive made the form, but a little trouble with the PHP part.
I could use this method:
<?php
if(isset($_POST['style']) == 'Budget') {
if ($_POST['style'] == 'PHP' && $_POST['due'] == '1 week' && $_POST['pages'] == '3-10')
{
echo 150 + 150 + 50 / 3;
}
elseif ($_POST['style'] == 'PHP' && $_POST['due'] == '1 week' && $_POST['pages'] == '10-20')
{
echo 150 + 150 + 100 / 3;
}
elseif ($_POST['style'] == 'PHP' && $_POST['due'] == '1 week' && $_POST['pages'] == '20+')
{
echo 150 + 150 + 200 / 3;
}
}
And so on...
?>
but it will take very very long to program each option, so is there an easier method to do this?
Ive made the form, but a little trouble with the PHP part.
I could use this method:
<?php
if(isset($_POST['style']) == 'Budget') {
if ($_POST['style'] == 'PHP' && $_POST['due'] == '1 week' && $_POST['pages'] == '3-10')
{
echo 150 + 150 + 50 / 3;
}
elseif ($_POST['style'] == 'PHP' && $_POST['due'] == '1 week' && $_POST['pages'] == '10-20')
{
echo 150 + 150 + 100 / 3;
}
elseif ($_POST['style'] == 'PHP' && $_POST['due'] == '1 week' && $_POST['pages'] == '20+')
{
echo 150 + 150 + 200 / 3;
}
}
And so on...
?>
but it will take very very long to program each option, so is there an easier method to do this?