maybe the problem in the details.
So i have 3 files so far.:
form1.html
serc.php
vwaudidiesel.html
you can check them on the hcases.co.uk site.
What i want to do.
the main page is the form1.html there is 2 drop down option if someone choos vw and diesel then the visitor be directed to --> vwaudidiesel.html
and so on… so if someone choos fiat and petrol then be directed to —> fiatpetrol.html (fiatpetrol.html is not redy yet.
the problem at the moment:
when i do the if statment like this:
<?
$model = $_POST['model'];
$fuel = $_POST['fuel'];
if( $model == 14 && $fuel==2 ) {
echo "this is vw diesel";
}
else {
echo "something else";
}
?>[/code]
it is works fine if someone choos vw and the diesel in the menu then printed the good text but when i ty to redirect to other page like this:
[code]<?
$model = $_POST['model'];
$fuel = $_POST['fuel'];
if( $model == 14 && $fuel==2 ) {
header('Location: http://hcases.co.uk/vwaudidiesel.html');
exit;
}
else {
echo "The if statement evaluated to false";
}
?>
It doesn’t work. , only an empty page be loaded.
Here are the codes i done so fare:
form1.html
[code]
Petrol Diesel
[/code]serc.php
[code]<?
$model = $_POST[‘model’];
$fuel = $_POST[‘fuel’];
if( $model == 14 && $fuel==2 ) {
header(‘Location: http://hcases.co.uk/vwaudidiesel.html’);
exit;
}
else {
echo “The if statement evaluated to false”;
}
?>
[/code]
I dont post the vwaudidiesel.html it is to large. you can check it on the hcases.co.uk/vwaudidiesel.html
If you have any other idea how to do it it would be welcome.
Thanks for any help.