Go Back   Forum Care Forums > Development Reference Area > Php Development

Reply
 
LinkBack Thread Tools Display Modes
I cannot figure out why this is not working?
Old
  (#1)
Brad Sumrall
Guest
 
Posts: n/a
Default I cannot figure out why this is not working? - 06-04-2007, 01:37 AM

<?php

{

$to =
("EMAIL REMOVED,tom@floridaon lineinvestments.com");

$subject = "online guestbook register";

$email = $_POST['email'] . "\n";

$headers = "Reply-To: " . $_POST['email'] . "\n";

$body = "Visitor Infomation: " . "\n" .

"Name: " . $_POST['name2'] . "\n" .

"Email: " . $_POST['email2'] . "\n";

}

else

{

mail($to,$subject,$body,$headers);

$to = ("$email2");

$subject = ("Thank you");

$email = $_POST['email'] . "\n";

$headers = "Reply-To: " . $_POST['email'] . "\n";

$body = "Thank you for signing our Guest Book and visiting our website. Feel
free to search our extensive property database, as this is the most current
up to date information in the Real Estate Market today. You will see the
latest listings the same time the Realtors do. Check out
http://www.Floridaonlineinvestments.com" . "\n" .

mail($to,$subject,$body,$headers);

}

?>




   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: [PHP] I cannot figure out why this is not working?
Old
  (#2)
Tijnema
Guest
 
Posts: n/a
Default Re: [PHP] I cannot figure out why this is not working? - 06-04-2007, 01:37 AM

On 6/2/07, Brad Sumrall <EMAIL REMOVED> wrote:
> <?php
>
> {
>
> $to =
> ("EMAIL REMOVED,tom@floridaon lineinvestments.com");
>
> $subject = "online guestbook register";
>
> $email = $_POST['email'] . "\n";
>
> $headers = "Reply-To: " . $_POST['email'] . "\n";
>
> $body = "Visitor Infomation: " . "\n" .
>
> "Name: " . $_POST['name2'] . "\n" .
>
> "Email: " . $_POST['email2'] . "\n";
>
> }
>
> else
>
> {
>
> mail($to,$subject,$body,$headers);
>
> $to = ("$email2");


Where did you get $email2??
>
> $subject = ("Thank you");
>
> $email = $_POST['email'] . "\n";


Why do you need $email?

>
> $headers = "Reply-To: " . $_POST['email'] . "\n";
>
> $body = "Thank you for signing our Guest Book and visiting our website. Feel
> free to search our extensive property database, as this is the most current
> up to date information in the Real Estate Market today. You will see the
> latest listings the same time the Realtors do. Check out
> http://www.Floridaonlineinvestments.com" . "\n" .
>
> mail($to,$subject,$body,$headers);
>
> }
>
> ?>


Did you get any error?
And what does mail return? true or false?

Tijnema
>
>
>
>

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: [PHP] I cannot figure out why this is not working?
Old
  (#3)
Jim Lucas
Guest
 
Posts: n/a
Default Re: [PHP] I cannot figure out why this is not working? - 06-04-2007, 01:37 AM

Brad Sumrall wrote:
> <?php
>
> {

What? why is this here?

>
> $to =
> ("EMAIL REMOVED,tom@floridaon lineinvestments.com");

why parenthesis around string definition?

>
> $subject = "online guestbook register";
>
> $email = $_POST['email'] . "\n";
>
> $headers = "Reply-To: " . $_POST['email'] . "\n";
>
> $body = "Visitor Infomation: " . "\n" .
>
> "Name: " . $_POST['name2'] . "\n" .
>
> "Email: " . $_POST['email2'] . "\n";
>
> }
>
> else
>
> {
>
> mail($to,$subject,$body,$headers);

This is so confusing... You are calling the mail() function before you
are setting everything...

Is this really your code, or did you copy bits and pieces of you code to
make this example?

>
> $to = ("$email2");
>
> $subject = ("Thank you");
>
> $email = $_POST['email'] . "\n";
>
> $headers = "Reply-To: " . $_POST['email'] . "\n";
>
> $body = "Thank you for signing our Guest Book and visiting our website. Feel
> free to search our extensive property database, as this is the most current
> up to date information in the Real Estate Market today. You will see the
> latest listings the same time the Realtors do. Check out
> http://www.Floridaonlineinvestments.com" . "\n" .

Shouldn't there be a semi-colon here? instead of a period?

Why are you closing your string and then concatenating another with just
a newline?

>
> mail($to,$subject,$body,$headers);
>
> }
>
> ?>
>
>
>
>

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: I cannot figure out why this is not working?
Old
  (#4)
Jonesy
Guest
 
Posts: n/a
Default Re: I cannot figure out why this is not working? - 06-04-2007, 01:37 AM

On Sat, 2 Jun 2007 18:34:36 -0400, Brad Sumrall queried:

"I cannot figure out why this is not working?"

Just as soon as the Crack gmane.comp.php.general Mind Reading Team
revealss your meaning of "not working", someone will get back to you.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top