There are some errors not comform correctly...

the mail() function

Moderators: macek, egami, gesf

chandananalin
New php-forum User
New php-forum User
Posts: 3
Joined: Tue Aug 07, 2012 9:20 pm

There are some errors not comform correctly...

Postby chandananalin » Tue Aug 07, 2012 9:36 pm

<?php

mysql_connect("localhost","poddi","1234") or die(mysql_error()) ;
mysql_select_db("new") or die(mysql_error()) ;

if(isset($_GET['email_address']) && !empty($_GET['email_address']) AND isset($_GET['proposer_hash']) && !empty($_GET['proposer_hash'])){
// Verify data
$mail_address = mysql_escape_string($_GET['email_address']); // Set email variable
$proposer_hash= mysql_escape_string($_GET['proposer_hash']); // Set hash variable

$search = mysql_query("SELECT email_address, proposer_hash cw_user FROM users WHERE email_address='".$email_address."' AND proposer_hash='".$proposer_hash."' AND aproposer_activate='0'") or die(mysql_error());
$match = mysql_num_rows($search);

if($match>0){
// We have a match, activate the account
mysql_query("UPDATE cw_user SET proposer_activate='1' WHERE email_address='".$email_address."' AND proposer_hash='".$proposer_hash."' AND proposer_activate='0'") or die(mysql_error());
echo '<div class="statusmsg">Your account has been activated, you can now login</div>';
}else{
// No match -> invalid url or account has already been activated.
echo '<div class="statusmsg">The url is either invalid or you already have activated your account.</div>';
}

}else{
// Invalid approach
echo '<div class="statusmsg">Invalid approach, please use the link that has been send to your email.</div>';
}
?>
HELP ME!!!!!!!!!!!!!

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 2 guests