Jump to content
Larry Ullman's Book Forums

Recommended Posts

Since I'm such a newbie I must be looking at this incorrectly...

 

On page 50, in Chapter2, line 46 it says "echo '<p><b>Good day, Sir!</b></p>';" thus showing an echo statement.

 

But at the top of page 52, in step 6 it says "$greeting = '<p><b>Good day, Sir!</b></p>';" thus assigning a variable.

 

It's the same with "Madam" below it. What am I missing?

 

Thanks for any and all help!

 

Perry

Link to comment
Share on other sites

Line 43 $gender = $_REQUEST['gender'] Either M for Male or F for Female. $_REQUEST['gender'] is a value received from your form radio buttons (e.g.) M or F

Line 45 is your if conditional Basicly saying if $gender = M print <p><b>Good day, Sir!</b></p> if $gender is not M then the elseif ($gender == F) checks to see if the value is equal to F for female, if the user checked the box for female then the output would be LINE 48 <p><b>Good day, Madam!</b></p>

Line 50 would be $gender = NULL; // meaning no value, the radio GENDER button was not clicked. Then line 51 the error message Gender should either be "M" or "F"!

 

Hope this helps

jp

Link to comment
Share on other sites

 Share

×
×
  • Create New...