Oh,
Well, it is basically the same thing as I wrote in the last post (Except you don't need to check wether data has been posted):
The page I put there will display a form if no data has been submitted. After submitting the data (To itself!) it will find that the variable (submitted) has been set, and that he has to process the data. You have certain criteria for a winner, and based on wether the person is a winner, specific conten is put in the variable $body, which you will print (echo) in the HTML section of the file.
Else this is aan option:
you have a form, which posts data to a file, form_process.php
The file form_process.php will load a page win.php or nowin.php, based on the input fo the form
In the file form_process:
if <your statement for not a winner>
{ // person is a winner
header ("Location: nowin.php?name=$name&email=$email"); /* Redirect browser to not a winner
} else { //person is a winner
header ("Location: win.php?name=$name&email=$email"); /* Redirect browser to a winner page
}
In the pages win.php and nowin.php you can put PhP / HTML:
<html><head></head><body>
I am sorry <? echo $name ?>,
<br>
You have not won
</body>
</html>
Of course you can have one output page, and you set a variable in form_process.php wether somebody has won, which you add to the redirect file: header ("Location: win.php?name=$name&email=$email&winner=$winner");
In te page you can then check whether the person has won or not, and display a certain type.
hope this helps!