O'Reilly Forums: Chapter 4 Page 204 - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 4 Page 204

#1 User is offline   PTheo 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 10-March 12

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?
0

#2 User is offline   rhender 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 10
  • Joined: 13-August 12

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
name="Submit"
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.

This post has been edited by rhender: 13 August 2012 - 11:41 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users