Chapter 4 Page 204

  • Please log in to reply
1 reply to this topic

#1 PTheo


    New Member

  • Members
  • Pip
  • 3 posts

Posted 17 June 2012 - 03:39 PM

Hi guys.

I'm at chapter 4 on page 204. The code is working fine up to the point where I introduce the stiicky data code in the html form: value="<?php echo $subject; ?>" and the same thing with the textarea. The problem is if $output_form is true, then you still have undefined values you are trying to echo which are the $subject and $text due to the fact that isset = false. I even tried the downloaded code from the zip file available on the head first server and it had the exactly same problem with mine. I saw some posts regarding the issue but none solution. can anyone help?

#2 rhender


    Active Member

  • Members
  • PipPip
  • 10 posts

Posted 13 August 2012 - 11:40 AM

I was having the same problem here. Then I looked at the code from the ch04/final/makemeelvis/sendemail.php file side by side with the file that I had created while following the chapter.

I corrected any areas that were different. The example in the book is different from the one in the downloaded code from the internet.

Also the one thing that seemed to save me... for whatever reason... was making sure that
<input type="submit" name="submit" value="Submit" />
looked exactly like that.

Before I corrected it, it had
with a capital S instead of lower case. I think that is what solved the "sticky form problem" for me.

Although before that correction, I also realized that in the downloaded code example from internet... the following code
else {
  $output_form = true;
was in a different place as well,... in the example in the book.

So it was a few corrections that got it corrected I believe. Just make sure to check your work against the code in the downloaded internet examples.

Edited by rhender, 13 August 2012 - 11:41 AM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users