![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
linux1880
-
Posts
136 -
Joined
-
Last visited
Posts posted by linux1880
-
-
If insert the above php mail block code on the original page which has got other variables and forms that mail thing work but when i create another page sendmail.php of this mail and insert the code
<?php $to = "memem@gmail.com"; $subject = "This is a email feedback from me"; $body = $row['noteforstudents']; $headers = "From: ashfh@djd.co.uk\r\n" . "X-Mailer: xxxx LONDON"; if (mail($to, $subject, $body, $headers)) { echo("<p>Message sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?>
I get empty message .
It would be no problem if the mail wouldn't go everytimes I refresh the page while placing the code on the same page so i did put the button referencing
<form method="post" action="sendmail.php"> <div align="center"> <input type="submit" value="send this email"/> </div> </form>
so that if i press the button mail would go to student,
no luck
-
-
Thank you sir,
$body = $row['noteforstudents'];
This code did work on the same page as there are other codings and the mail goes everytime the page refresh.
But when i move this page to another php page like something.php it doesn;t pull the data from the database, any help would be greatful
<?php $to = "memem@gmail.com"; $subject = "This is a email feedback from me"; $body = $row['noteforstudents']; $headers = "From: ashfh@djd.co.uk\r\n" . "X-Mailer: xxxx LONDON"; if (mail($to, $subject, $body, $headers)) { echo("<p>Message sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?>
-
anyone there please ?
-
Hi danny,
I have another php page which extact the data from the database with this command
<?=$row['noteforstudents'] ?>
I thought the same thing will pull out the same information from the database to the email but it's not happening.
I put $row as you have taught me but doesn't seem to work
-
I did try
<?php $to = "webmaster@placett.co.uk"; $subject = "You have received feedback from LONDON"; $body = $row['noteforstudents']; $headers = "From: an@angliancollege.co.uk\r\n" . "X-Mailer:LONDON"; if (mail($to, $subject, $body, $headers)) { echo("<p>Message sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?>
There is nothing on the message body, how ever, when i just type plain text like "hellow how are you". It goes,
dunno what's happening
-
Sorry I am new and didn't know where to post.
but how do i add variable in body ? just like
$body = "<?=$row['noteforstudents'] ?>";
I did that and it didn't work
-
?php
$to = "me@headache.com";
$subject = "hi how are you";
$body = "helllo hello this is test.. this is test ........";
$headers = "From: mail@mail.co.uk\r\n" .
"X-Mailer: xxxx LONDON";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
Hello friends,
I want to send this email to different users.
I already have variables like
emails: <?=$row['email_add'] ?>
body: <?=$row['noteforstudents'] ?>
I just want different person to receive email according to the details above. Do I need to set up session or require_once for this ?
I don't know how to setup pls help
Thanks Edit/Delete Message
Please help me to set up sending emails to users :(
in PHP Coding Help
Posted
Putting that code on the same page also would give the solution but is there any way to stop going mail everytime i open the page or refresh the page ?
Thank you.