Jump to content
Larry Ullman's Book Forums

perry

Members
  • Posts

    4
  • Joined

  • Last visited

perry's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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
  2. Mr. Pearson, That is EXTREMELY helpful... Thank you so much for spending the time to help me! Perry
  3. Mr. Pearson, First it's on pages 120 and 121. So, if I understand correctly, after creating the flag variable $okay = TRUE; (page 120) the script will always print the success message until the if empty() Validation Function is introduced on page 122 which will then cause the $okay flag variable to change to FALSE. That I understand but why will then the success message not print? if ($okay) { print '<p>You have been successfully registered (but not really).</p>; What's the connection of $okay now being FALSE to the nonprinting of the message? Thanks so much for all your help!!! Perry
  4. I'm hoping for some kind assistance for this old brain. I'm trying to change the cliché "You can't teach an old dog new tricks"... OK, I understand creating of the $okay flag variable as TRUE and then the introduction of the empty() function with if (empty($_POST['email'])) {print '<p class="error"> Please enter your email address.</p>'; $okay = FALSE. But what I don't understand is if the user does not enter the necessary information and then the $okay value changes to FALSE, what keeps the success message from printing? So the flag variable has changed from TRUE to FALSE, how does that make the success message not print? To quote the book "In that case, this conditional will also be FALSE so the message won't be printed". Obviously it works, I'm just not getting why... Any help would be much appreciated. Perry
×
×
  • Create New...