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

  • Home
  • SEARCH
  • 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 6852611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:24:51+00:00 2026-05-27T01:24:51+00:00

I guess it’ll probably be another simple mistake I’ve looked over about 20 times

  • 0

I guess it’ll probably be another simple mistake I’ve looked over about 20 times without noticing it, but my data is not being inserted into my database somehow.

I’m doing 2 things in this query. I’m creating the table, and inserting some data into it. Somehow the table is being created, but the data is not inserted into it.
No error, nothing to indicate that something’s gone wrong.

Query:

$query = $dblink->prepare
(
"CREATE TABLE users
(
    id int(6) NOT NULL auto_increment,
    nick varchar(40) NOT NULL,
    name varchar(120),
    email varchar(256) NOT NULL,
    pass varchar(256) NOT NULL,
    salt binary(64) NOT NULL,
    avatar varchar(0),
    level int(1) NOT NULL,
    primary key (id)
);"
. PHP_EOL .
"INSERT INTO users
(
    nick,
    name,
    email,
    pass,
    salt,
    avatar,
    level
)
VALUES
(
    :nick,
    :name,
    :email,
    :pass,
    :salt,
    :avatar,
    5
);"
);
$query->bindParam(':nick', $_POST['step3_nick']);
$query->bindParam(':name', $_POST['step3_name']);
$query->bindParam(':email', $_POST['step3_email']);
$salt = generateSalt();
$query->bindParam(':pass', hashPassword($_POST['step3_pass'], $salt));
$query->bindParam(':salt', $salt);
unset($salt);
$query->bindParam(':avatar', $img['logo']);
$query->execute();

Bigger chunk of code:

elseif ($step == 4)
{
    ## Stap 4 ##
    include_once('config.php');
    try
    {
        $dblink = new PDO
        (
            'mysql:host=' . $config['db']['host'] . ';dbname=' . $config['db']['name'],
            $config['db']['user'],
            $config['db']['pass']
        );
        $dblink->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    }
    catch (Exception $ex)
    {
        die
        (
            '<p style="color: red; font-weight: bold;">' . ($language == 'nl') ? ('Kon niet verbinden met de database!') : ("Couldn't connect to the database") . '</p>' . PHP_EOL .
            '<p style="color: red;">' . $ex . '</p>'
        );
    }
    if ($_POST['step3_pass'] !== $_POST['step3_pass_confirm'])
    {
        die
        (
            '<p style="color: red; font-weight: bold;">' . ($language == 'nl') ? ('De opgegeven wachtwoorden komen niet overeen!') : ("The given passwords don't match!") . '</p>'
        );
    }
    $query = $dblink->prepare
    (
        "CREATE TABLE users
        (
            id int(6) NOT NULL auto_increment,
            nick varchar(40) NOT NULL,
            name varchar(120),
            email varchar(256) NOT NULL,
            pass varchar(256) NOT NULL,
            salt binary(64) NOT NULL,
            avatar varchar(0),
            level int(1) NOT NULL,
            primary key (id)
        );"
        . PHP_EOL .
        "INSERT INTO users
        (
            nick,
            name,
            email,
            pass,
            salt,
            avatar,
            level
        )
        VALUES
        (
            :nick,
            :name,
            :email,
            :pass,
            :salt,
            :avatar,
            5
        );"
    );
    $query->bindParam(':nick', $_POST['step3_nick']);
    $query->bindParam(':name', $_POST['step3_name']);
    $query->bindParam(':email', $_POST['step3_email']);
    $salt = generateSalt();
    $query->bindParam(':pass', hashPassword($_POST['step3_pass'], $salt));
    $query->bindParam(':salt', $salt);
    unset($salt);
    $query->bindParam(':avatar', $img['logo']);
    $query->execute();

    echo ($language == 'nl') ? ('<strong>Installatie voltooid!</strong>') : ('<strong>Setup completed!</strong>');
    ?>
        <form action="index.php" method="POST">
            <input type="checkbox" name="step4_removesetupfile" /><?php echo ($language == 'nl') ? ('Verwijder <em>setup.php</em>.') : ('Remove <em>setup.php</em>.'); ?>
            <input type="submit" value="»" />
        </form>
    <?php
}

Also, the value column in the table settings isn’t given any value, while $language does have a value.

  • 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-05-27T01:24:52+00:00Added an answer on May 27, 2026 at 1:24 am

    It was just a typo, as usual >.<
    It was one that neither of you could have found as I made a typo in the form it get’s the POST data from.

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

Sidebar

Related Questions

I guess its probably a simple thing to do - but is there anyway
I guess this is covered somewhere but I'm not able to find. Guess I'm
i guess this is a really simple problem, but i just can't get it
I guess it's a simple question, but how can I replace nil values in
Guess this is pretty simple, but searching didn't help... I want an ExpandableListView, where
I guess what I am trying to do should be simple, but don’t know
I guess it's not so hard to do this by hand, but I was
I guess this has been asked before here , but I'm still confused about
I guess i have a simple question about better code organization. Say i have
I guess the real question is: If I don't care about dirty reads, will

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.