Jump to content

mail (sending me two emails -- why?)


RyanSF07

Recommended Posts

Hi -- I'm receiving two emails with this code.. one from "webmaster" and another from "serveradmin."  What's odd is that the one from serveradmin contains the subject, but not the message.

 

Does anyone know why this is happening and how to fix it so I only receive one email?

 

thanks -- here's the code

 

$usercheck = $_SESSION['user_id'];
$check = mysql_query("SELECT * FROM articles WHERE art.id = '$_GET[id]' AND art.user_id = '$usercheck'")or die(mysql_error());
$check2 = mysql_num_rows($check);

$recep = "me@gmail.com";
$subject = "Email Subject Line";
$text = "$usercheck";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=UTF-8\r\n";
$headers .= "Reply-to: me@gmail.com\n";
$headers .= "X-Mailer: PHP\n";

if ($check2 != 1) {
include_once ("nav_my_account.inc");
mail("$recep","$subject","$text","$headers");
$content = "<p>You can only edit your own articles. <br><br>If you feel you're getting this message in error, it may be that your session has timed out and you need to log back in. </p>\n";

} else {

include_once ("nav_my_account.inc"); 
.....etc....

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.