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 8084545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:50:00+00:00 2026-06-05T17:50:00+00:00

The values wont insert into my database, the message tells me that registration is

  • 0

The values wont insert into my database, the message tells me that registration is complete but nothing gets stored in database, please help. Thanks!

Your post does not have much context to explain the code sections;
please explain your scenario more clearly.

Heres code:

$submit = $_POST['submit'];

$name = strip_tags($_POST['fullnamefield']);
$regemail = strip_tags($_POST['regemailfield']);
$password = strip_tags($_POST['regpasswordfield']);
$repeatpassword = strip_tags($_POST['regpasswordconfirmfield']);
$date = date("Y-m-d");

if ($submit)
{

    if ($name&&$regemail&&$password&&$repeatpassword)
    {

        if ($password==$repeatpassword)
        {

        if (strlen($name)>32||strlen($regemail)>1024)
        {
         echo "Length of name or email is too long.";
        }
        else
        {
        if (strlen($password)>32||strlen($password)<6)
        {
        echo "Password must be between 6 and 32 characters long.";
        }
        else
        {

        $password = md5($password);
        $repeatpassword = md5($repeatpassword);

        $connect = mysql_connect("xx","xx","xx");
        mysql_select_db("xx");

        $queryreg = mysql_query("

        INSERT INTO users VALUES ('','$name','$regemail','$password','$date')

        ");

        die("You have been registered!");

        }

        }
        }
        else
            echo "Your passwords do not match";
    }
    else
        echo "Please fill in all fields.";

}
  • 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-05T17:50:01+00:00Added an answer on June 5, 2026 at 5:50 pm

    To get some diagnostic information, I’d add

    or die(mysql_error());
    

    to your mysql_query statement making the final line

    $queryreg = mysql_query("
    
        INSERT INTO users VALUES ('','$name','$regemail','$password','$date')
    
        ") or die (mysql_error());
    

    What this will do is output any errors mysql is having during the query. Post them back here if you aren’t sure what you’re looking at.

    Hope this helps.

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

Sidebar

Related Questions

I'm trying to insert registration data into a database but my php code isn't
I was trying to use executemany to insert values into a database, but it
I have question, how can i insert a new data into a database that
I have some values that are stored with core data, and I have opened
Why won't the preparedstatement insert the data into the database table? import java.sql.*; public
I'm trying to post data with AJAX and insert it into a database table.
Here's some example code: $sql = INSERT INTO Users (Firstname,Surname) VALUES ('$firstname', '$surname'); $stmt
This is the shortest of two forms that wont send data to the database,
how do i insert items into an html listbox from a database? im using
My php script won't work if i try to insert into database something in

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.