Jump to content

"X-Mailer: PHP/" . phpversion());


gnetuk

Recommended Posts

Hi all.

 

Can someone tell me why i get two emails when somone has activated on my site. I only need the one lol.

 

heres my code

 

<?php 
session_start();
include ('dbc.php'); 

if (!isset($_GET['usr']) && !isset($_GET['code']) )
{
header("Location: register.php?msg=ERROR: You have not activated PLEASE USE VALID E-MAIL....");

}else

$rsCode = mysql_query("SELECT activation_code from usersgnet where user_email='$_GET[usr]'") or die(mysql_error());

list($acode) = mysql_fetch_array($rsCode);

if ($_GET['code'] == $acode)
{
mysql_query("UPDATE usersgnet set user_activated=1 where user_email='$_GET[usr]'") or die(mysql_error());



  mail(
   

    '[email protected]',

    'ACTIVATION A C T I V A T E D    D O N E    new member SET',

    'Check the http://gnetuk.net/forum/admin/index.php',

    "From: \"www.gnetuk.net DO NOT REPLY\" <[email protected]>\r\n" .
     "X-Mailer: PHP/" . phpversion());
}else

{
header("Location: register.php?msg=ERROR: You have not activated PLEASE USE VALID E-MAIL....");
die("chedktjhe. Pultravigenslips..");
}
?>

 

 

Any ideas.  gnetuk :-)

I couldn't see any loops in your script, and the mail function only appears once. I see so some redirects, so I'm gonna go ahead and guess it redirects to the same page. I've never seen else been used like that before.

 

}else

$rsCode = mysql_query("SELECT activation_code from usersgnet where user_email='$_GET[usr]'") or die(mysql_error());

list($acode) = mysql_fetch_array($rsCode);

if ($_GET['code'] == $acode)
{

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.