Jump to content

Recommended Posts

???

Where did i go wrong???

========================
<?
require_once("conn.php");
require_once("includes.php");

if(isset($_POST[s1]))
{
$expdate = time() + (365*24*60*60);
$q1 = "insert into class_members set
username = '$_POST[NewUsername]',
password = '$_POST[p1]',
FirstName = '$_POST[FirstName]',
LastName = '$_POST[LastName]',
Address = '$_POST[Address]',
City = '$_POST[City]',
State = '$_POST[State]',
ZipCode = '$_POST[ZipCode]',
Country = '$_POST[Country]',
Phone = '$_POST[Phone]',
AlternatePhone = '$_POST[AlternatePhone]',
Fax = '$_POST[Fax]',
email = '$_POST[email]',
RegDate = '$t',
AccountStatus = 'active',
StandardAds = 10,
ExpDate = '$expdate'";

mysql_query($q1);

if(mysql_error())
{
$error = "<font face=verdana size=2 color=red><b>The username <font color=black>$_POST[NewUsername]</font> is already in use!<br>Select another one, please!</b></font>";

unset($_POST[NewUsername]);
}
else
{
$last = mysql_insert_id();
$_SESSION[AgentID] = $last;

$variable = "$_POST[NewUsername]  $_POST[FirstName]  $_POST[LastName]  $_POST[email] has just registered";

mail ('support@***********.com', 'New Member', $variable, 'From:support@*************.com');

$to = $_POST[email];
$subject = "Welcome to $_SERVER[HTTP_HOST]";
$message = "Hello $_POST[NewUsername],\n\nYour account was updated! You are able to post ";

$my_message[] = "10 items every month";


if(!empty($my_message))
{
$my_offers = implode("and", $my_message);
}

$MyDate = date("m/d/Y",$expdate);
$message .= "$my_offers until $MyDate. That's a great start!\n\nHere's your login information:\n\nUsername: $_POST[NewUsername]\nPassword: $_POST[p1]\n\nThank you once again for joining our yard sale family! We hope you have fun in buying and selling around the neighborhood. See you around! \nsupport@**********.com\n$_SERVER[HTTP_HOST]";

$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";
$headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: PHP/" . phpversion()."\n";

mail($to, $subject, $message, $headers);

header("location:welcome.php");
exit();
}

}

//get the templates
require_once("templates/HeaderTemplate.php");
require_once("templates/RegistrationTemplate.php");
require_once("templates/FooterTemplate.php");

?>

========================================
Link to comment
https://forums.phpfreaks.com/topic/29580-e-mailing-member-info-password/
Share on other sites

Oh crap, i totally forgot the important q! LOL ((((so sorry, i'm not here on earth at the moment)......:P

Upon e-mailing member the e-mail script, it shows on the PASSWORD the username instead. Like...

Username: madonna
Password: madonna

I don't know where it went wrong. I'm a baby in php. I appreciate it:-)
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.