There are some errors not comform correctly...

the mail() function

Moderators: egami, macek, gesf

Post Reply

Tue Aug 07, 2012 9:36 pm


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

// 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>';
// 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>';

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

Post Reply