the easiest way (for me) is to put everything in just a one file "action.php".
and use this (I modified the code just a litle bit):
<Body>
<?php
if ($submit)
{
?>
Hi. <?php echo "$a"; ?>
<BR>
<?php
if ($b == Male) {
$data = "You are male so unless ure gay, U screw females 🙂" ; }
elseif ($b == Female) {
$data = "Lesbians are cool" ; }
else {
$data = "damn hermodites" ; }
?>
<?php echo $data; ?>
<?php
}
else
{
?>
<form>
Your name: <input type="text" name="a">
You sex (Male or Female): <input type="text" name="b">
<input type="submit" name="submit">
</form>
<?php
}
?>
</Body>
🙂) cool messages, but if you want to make something like this, it's better to use radio buttons, because someone could write 'male' instead of 'Male', and linux machines don't like that.