Hi folks
And thanks Larry for a great book, its quite inspiring. I'm new to programming, I know my HTML and CSS but that's it. I've been following your book and I'm up to Chapter 2 - Review and Pursue and stuck on the third question, sorry if this has been covered already.
The code in question is
if (isset($_REQUEST['gender'])) {
$gender = $_REQUEST['gender'];
if ($gender == 'M') {
$greeting = '<p><b>Good day, Sir!<b></p>';
} elseif ($gender == 'F') {
$greeting = '<p><b>Good day, Madam!<b></p>';
} else {
$gender = NULL;
echo '<p class="error">Gender should be either "M" or "F"!</p>';
}
I've been stuck all day, I have gone away and come back again and I'm still drawing a blank.
Any help would be really appreciated, thanks.