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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:53:18+00:00 2026-06-12T14:53:18+00:00

Query is running however not being sent to SQL server. My Current Register Script.

  • 0

Query is running however not being sent to SQL server.
My Current Register Script.

$link = mysqli_connect("$server", "$user", "$pass", "$webdb");
$username = mysqli_real_escape_string($link, (string) $_POST['username']);
$displayname = mysqli_real_escape_string($link, (string) $_POST['display_name']);
$email = mysqli_real_escape_string($link, (string) $_POST['email']);
$password = sha1((string) $_POST['password']);
$query="INSERT INTO user (`username`, `nicename`, `email`, `password`)
VALUES ('$username', '$displayname', '$email', '$password', '1')";
mysqli_query($link, $query);
mysqli_close($link);
echo $query;
?>

The output I recieve from the Query:

INSERT INTO user (username, nicename, email, password) VALUES ('orion5814', 'Orion5814', 'my@abc.com', '72f2ac484bee398758e769530dd56228d905884d', '1')

I’ve checked all my link variables and they’re all set correctly as far as having the right information in place, so I don’t know where else to go from here. Sorry for all the questions; you can view it at doxramos.org if you think it would help at all.

  • 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-12T14:53:19+00:00Added an answer on June 12, 2026 at 2:53 pm

    The query is flawed. You name 4 columns (username, nicename, email, password), but you list 5 values ('orion5814','Orion5814','my@abc.com','72f2ac484bee398758e769530dd56228d905884d','1')
    If you remove the last value, the query should work.

    Also, you could simplify your code by using the object oriented interface to mysqli like this:

    $username = $link->real_escape_string($_POST['username']);
    

    and

    $link->query($query);
    $link->close();
    

    You also don’t need to explicitly cast the variables as strings since that is done automatically if needed for your code.

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

Sidebar

Related Questions

I'm running an MySQL query that returns results based on location. However I have
Im running this query on the same server as the web application, so SPQuery.ExpandRecurrence
I am running my query using WebMatrix, I think it is correct, however I
I have a database with a few tables running on SQL Server 2008, and
The query I'm running is as follows, however I'm getting this error: #1054 -
I have an SQL LIKE query running on mySQL which runs fine on my
At the moment I am running an update query which is working, however it
i am wondering is that possible (best practice) to run two long running query
After running this query statement with my database: select * from articles where content
I'm running a query which looks like this SELECT parent.field, child.field FROM parent JOIN

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.