I have written this as an answer to some other major issues I had with another form I was trying...
The problem now is, If a required field left empty...it links to this page..."ALL GOOD"
But when the 'Submit' button is clicked, the page goes white and doesn't show the page reqested...
Where have I gone wrong?? ๐
<?
if (!$who) {include("http://xxxxxxxxxxxxxxxxxx/~xxxxxxxxxxx/required.php"); exit; } else {
if (!$email) {include("http://xxxxxxxxxxxxxxxxxx/~xxxxxxxxxxx/required.php"); exit; } else {
if (!$spam) {include("http://xxxxxxxxxxxxxxxxxx/~xxxxxxxxxxx/required.php"); exit; } else {
if (!$comment) {include("http://xxxxxxxxxxxxxxxxxx/~xxxxxxxxxxx/required.php"); exit; } else {
if (submit == "true") {include("http://xxxxxxxxxxxxxxxxxx/~xxxxxxxxxxx/contactaccept.php"); exit; } else {
mail("xxxxx@xxxxxx.xxx.xx", "XXXX.XXX = Contact Form", "
Contact Name: $sal. $who ,
Email Address: $email ,
Address: $street1 ,
Address: $suburb,
Address: $state, $postcode,
Home: $phone1 ,
Mobile: $phone2 ,
Type of contact; [ $type ]
============================================
Comments: $comment
============================================
");
}
}
}
}
}
?>
Help greatly appreciated