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(
   

    'webmaster@gnetuk.net',

    '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\" <postmaster@gnetuk.net>\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 :-)

Link to comment
Share on other sites

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)
{

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.