Receiving Error- Error: user account already exists..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I keep receiving the following error..( Error: user account already exists..
) although I don't have any data in my table. Any help would be appreciated.

The code follows:







include ('dbc.php'); 




if (isset($_POST['Submit']) =='Register')


   if (strlen($_POST['email']) < 5)


    die ("Incorrect email. Please enter valid email address..");


   if (strcmp(isset($_POST['pass1']),isset($_POST['pass2'])) ||
empty($_POST['pass1']) )


                //die ("Password does not match");

                die("ERROR: Password does not match or empty..");



                if (strcmp(md5($_POST['user_code']),$_SESSION['ckey']))


                                                 die("Invalid code entered.
Please enter the correct code as shown in the Image");


                $rs_duplicates = mysql_query("select id from users where

                $duplicates = mysql_num_rows($rs_duplicates);


                if ($duplicates> 0);


                //die ("ERROR: User account already exists.");

                header("Location: register.php?msg=ERROR: User account
already exists..");







                $md5pass = md5($_POST['pass2']);

                $activ_code = rand(1000,9999);

                $host  = $_SERVER['HTTP_HOST'];

                $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');

                mysql_query("INSERT INTO users



ll_name]')") or die(mysql_error());


                $message = 

"Thank you for registering an account with $server. Here are the login

User Email: $_POST[email] \n

Password: $_POST[pass2] \n

Activation Code: $activ_code \n


*** ACTIVATION LINK ***** \n

Activation Link:
http://$host$uri/activate.php?usr=$_POST[email]&code=$activ_code \n\n


Thank you. This is an automated response. PLEASE DO NOT REPLY.



                mail($_POST['email'] , "Login Activation", $message,

    "From: \"Auto-Response\" <notifications@$host>\r\n" .

     "X-Mailer: PHP/" . phpversion());



                echo ("Registration Successful! An activation code has been
sent to your email address with an activation link...");exit;



[PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Plagiarism Notes]     [Postgresql]     [Yosemite News]

Powered by Linux