Thanks for looking at this. This is the code from the beginning of the file to where it send the e-mail.
<? <?
session_start();
include "../affconfig.php";
include "./lang/$language";
include "./countries.php";
$errorMsg = '';
if($_POST['commited'] == 'yes')
{
// form was sent
mysql_connect($server, $db_user, $db_pass)
or die ("Database CONNECT Error (line 8)");
if($_POST['ausername'] == '')
$errorMsg .= AFF_SI_UNAMEMISSING.'<br>';
// check if user doesnt exist already
$userid = preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['ausername']); // protect against sql injection
$chk_user = mysql_db_query($database, "select refid from affiliates where refid='$userid'");
if(mysql_num_rows($chk_user) > 0)
{
$errorMsg .= AFF_SI_USEREXISTS.'<br>';
$_POST['ausername'] = '';
}
if($_POST['apassword'] == '')
$errorMsg .= AFF_SI_PWDMISSING.'<br>';
if($_POST['aemail'] == '')
$errorMsg .= AFF_SI_EMAILMISSING.'<br>';
if($errorMsg == '')
{
// save and send notification email
$aemailbody = "Dear ".$_POST['afirstname'].",\n\nWelcome to the exciting ChocoRich Free Chocolate Exchange online marketing system. With it you will be able to generate virtually unlimited leads who are asking you for a free sample of our healthy chocolate and our CD; How To Make A Fortune Giving Candy To Strangers.\nYour URL is
[SIZE=3][b] ."http://$domain/index.php?=$ausername"[/b][/SIZE] \n\n
."When you get to your webpage you will see a \"\training\"\ link at the bottom of the page. This will take you to a training page, which will tell you how to use the system. If you have questions from there please email us at ".$_POST['emailinfo']."\n\n\n"
."Again, welcome to the ChocoRich Team,."\n\n
."Greg Arnold"\n\n\n\n";
mysql_db_query($database, "INSERT INTO affiliates VALUES ('".$_POST['ausername']."', '".$_POST['apassword']."', '".$_POST['acompany']."', '".$_POST['atitle']."', '".$_POST['afirstname']."', '".$_POST['alastname']."', '".$_POST['awebsite']."', '".$_POST['aemail']."', '".$_POST['apayable']."', '".$_POST['astreet']."', '".$_POST['atown']."', '".$_POST['acounty']."', '".$_POST['apostcode']."', '".$_POST['acountry']."', '".$_POST['aphone']."', '".$_POST['afax']."', '".$_POST['adate']."')")
or die(mysql_error());
include "thankyou.php";
mail($_POST['aemail'], "Welcome New Affiliate!", $aemailbody, "From:".$emailinfo."\nReply-To:".$emailinfo."\n");
exit;
}
}
Again, Thanks in advance for your kind help.
Pattie