Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8944627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:04:24+00:00 2026-06-15T12:04:24+00:00

This registration form worked like a charm for months. I have changed nothing. Now,

  • 0

This registration form worked like a charm for months. I have changed nothing. Now, it gets through all the conditionals of duplicate name, email, and the password check, and then fails to INSERT mysql and returns the "An error has occurred. Your account was not created." I don’t see why. Has syntax changed or what?

    <div id="backdrop"></div>
    <div id="register">    
    <img src="http://www.staketheclaim.com/wp-content/themes/retlehs-roots-c526a84/dropbox/2012/rotate/header<?php echo(rand(1,4)); ?>.png" style="margin-left: -25px;margin-top: -20px;" />
    <div id="regi" style="width:400px;float: right;">
    <?php 
        if ($username && $userid) {
         echo "<div id='log-re' style='margin-left: 6px;width: 413px;'><h2>You must logout to register a new account. Not your Account?</h2>" . "<br /><br /><div id='cta'><a href='http://www.staketheclaim.com/logout/' class='button' style='padding-left: 36px;font-size: 24px;top: 2px;right: -160px;'>Logout Now</a></div></div>";    
        }
         else {
    if ($_POST['registerbtn']) {
         $getuser = $_POST['user'];
         $getemail = $_POST['email'];
         $password = $_POST['pass'];
         $getretypepass = $_POST['retypepass'];
         if ($getuser) {
             if(strpos($getuser, ' ') > 0 == false ){
             if ($getemail) {
                   if ($password) {
                         if ($getretypepass) {
                                if ( $password === $getretypepass) {
                                      if ( (strlen($getemail) >= 7) && (strstr($getemail, "@")) && (strstr($getemail, "."))){
                                            require("base.php");
                                            $query = mysql_query("SELECT * FROM users WHERE username='$getuser'");
                                            $numrows = mysql_num_rows($query);
                                            if ($numrows == 0) {
                                                 $query = mysql_query("SELECT * FROM users WHERE email='$getemail'");
                                            $numrows = mysql_num_rows($query);
                                            if ($numrows == 0) {
                                                $password = md5(md5("ss3verds4g".$password."ss357rd5sg"));
                                                $date = date("F d Y");
                                                $code = md5(rand());
                                        $bio = "Bio";
                                    $location = "Location";
                                                mysql_query("INSERT INTO users VALUES (
                                                              '','$getuser', '$password', '$getemail', '0', '$code', '$date', '$bio', '$location', '1'
                                                         )");
                                                         $query = mysql_query("SELECT * FROM users WHERE username='$getuser'");
                                                         $numrows = mysql_num_rows($query);
                                                         if  ($numrows == 1){
                                                               $site = "http://www.staketheclaim.com";
                                                               $webmaster = "noreply <noreply@staketheclaim.com>";
                                                                $headers = "From: $webmaster";
                                                                 $subject = "Activate Your Account";
                                                                 $message  = "Thanks for registering. Click the link below to activate your account.\n";
                                                                 $message .= "$site/activate/?user=$getuser&code=$code\n";
                                                                 $message .= "You must activate your account to login.";
                                                                 if (mail($getemail, $subject, $message, $headers )) {
                                                                          $errormsg = "You have been registered. You must activate your account from the activition link send to <b>$getemail</b>.";
                                                                          $getuser = "";
                                                                          $getemail = "";
                                                                     }
                                                                        else 
                                                             else 
                                                                   $errormsg ="An error has occured. Your account was not created.";
                                            }
                                            else
                                                $errormsg ="Their is already a user with that email.";
                                            }
                                            else
                                                $errormsg ="Their is already a user with that username.";
                                            mysql_close;
                                            }
                                            else
                                                $errormsg = "You must enter a valid email address to register.";
                                  }
                                  else
                                     $errormsg = "Your passwords did not match.";
                      } else 
                              $errormsg = "You must retype you password to register.";
                } else 
                       $errormsg = "You must enter a password to register.";
            } else
                  $errormsg = "You must enter you email to register.";
         } else
              $errormsg = "Your username cannot have any spaces.<br />";
      } else
          $errormsg = "You must enter a username to register.<br />";
    } $form = "<form action='' method='post' style='margin-top:-20px;'>
    <h2>Sign up for StakeTheClaim™.<br /> It's free!</h2>
    <br />
    <font color='red'>$errormsg</font>
    <br />
    <br />
    Username:
    <br />
    <input type='text' name='user' value='$getuser' style='' />
    <br />
    <br />
    Email:
    <br />
    <input type='text' name='email' value='$getemail' />
    <br />
    <br />
    Password:
    <br />
    <input type='password' name='pass' value='' />
    <br />
    <br />
    Re-Password:
    <br />
    <input type='password' name='retypepass' value='' />
    <br />
    <input type='submit' name='registerbtn' value='Register' />
    </form>";
    echo $form;
    }
    ?></div></div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:04:25+00:00Added an answer on June 15, 2026 at 12:04 pm

    It is possible this is a mysql data type issue (well, limit really). You say it fails on update but I’m only seeing an insert statement.

    What are the column types on the table users where the insert is being run?

    Basically, if you reach the limit of the column type, the insert will fail. This would be consistent with what you have said.

    Edit: Also, PHP is depreciating mysql_* calls. Shift to either mysqli_* or another alternative like PDO. The shift to mysqli for this code would be easy, but then your code needs for a full review, it is full of issues. What version of PHP are you running?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this registration form box, and i really like how the background gets
I have a check box in my registration form like this: <form name=reg id=reg
I have a registration form where this CSS rules apply. when user submits with
in my project i have one registration form which is developed in C#.net.to this
Let's say I have an user registration form. In this form, I have the
I have created custom registration form in drupal 6. i have used changed the
I have this registration form which is then validated using "bassistance's" validate.js: $('#pForm').validate({ rules:
I have a registration form and am using $.ajax to submit it. This is
At the moment, I have this DIV with a registration form centered over the
I have a registration form with a few fields. One of them looks like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.