O'Reilly Forums: Chapter 4 - Wrong Code - O'Reilly Forums

Jump to content

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

Chapter 4 - Wrong Code sendemail.php , doesn't work

#1 User is offline   zombie13 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 20-November 12

Posted 20 November 2012 - 01:14 AM

OK, I'm getting really frustrated but even the code I downloaded from the site shows the exact same message
When I run sendemail.php I get the following error


Notice: Undefined variable: subject in C:\wamp\www\go\sendemail.php on line 67 Call Stack #TimeMemoryFunctionLocation 10.0004145824{main}( )..\sendemail.php:0 " size="30" />



also the subject and body of the email are full of html tags.

How could I fix this? Anyone else with the same problem?
0

#2 User is offline   drewdin 

  • Super Veteran Member
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 589
  • Joined: 11-February 10
  • Gender:Male
  • Location:Boston

Posted 22 November 2012 - 08:44 PM

post your code, whats on line 67 on your sendemail.php?
0

#3 User is offline   Amay90 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 29-December 12

Posted 29 December 2012 - 02:57 AM

I had the same problem....here what I did!

The variables :
$subject = $_POST['subject'];
$text = $_POST['elvismail'];
$output_form = false;

should be defined before this statement:
if(isset($_POST['submit']))

Otherwise, they remain undefined.

Refer this post for more details:
http://forums.oreill...684#entry104684
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