On Wed, Jun 27, 2012 at 7:17 PM, Tim Dunphy <bluethu...@gmail.com> wrote:

One more little thing:

These notices:

> Notice: Undefined index: subject in
> /Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php
> on line 23 Notice: Undefined index: elvismail in
> /Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php

show up because you are processing form fields in $_POST when there
might not be any yet.

These lines:

>  $from = 'bluethu...@jokefire.com';
>  $subject = $_POST['subject'];
>  $text = $_POST['elvismail'];
>  $output_form = "false";

Should appear *after* this line:

>  if (isset($_POST['Submit'])) {

You should also check the $_POST entries for 'subject' and 'elvismail'
to make sure they are set to avoid the notices, even if you do move
them after the submit check. You never know!

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to