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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:16:58+00:00 2026-06-04T20:16:58+00:00

Basically, I’m creating a log in system. When I am dealing with the data

  • 0

Basically, I’m creating a log in system. When I am dealing with the data stored in a MySQL database, I get the following error:

Illegal double ‘200970e19291’ value found during parsing

with the following code:

<?php
session_start();    // Session start

$username = $_POST['username']; // Gets the username from the login page
$password = $_POST['password']; // Gets the password.
$salt = "oijahsfdapsf80efdjnsdjp"; // Salt

// Add the salt
$salt .= $password; // The password is now: oijahsfdapsf80efdjnsdjp_PLUS_THE_USERS_PASSWORD
$password = $salt; // Change the password var to contain the salt

// Encryption
$password = md5($password); // woo

?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Serrano Login</title>
</head>

<body>
<?php

// Connect to your database
mysql_connect("localhost", "root", "root") or die(mysql_error());
mysql_select_db('serrano');

$query = "SELECT * FROM accounts WHERE password = ".$password." LIMIT 1"; 

$username = mysql_real_escape_string($username); // just to be sure.

$result = mysql_query($query) or die(mysql_error());

while($row = mysql_fetch_array($result)){
    $resusername = $row['username']; // username from DB
    $respassword = $row['password']; // password from DB
    $resemail = $row['email']; // email from db

}

// Are they a valid user?
if ($respassword == $password) {
    // Yes they are.
    // Lets put some data in our session vars and mark them as logged in.
    $_SESSION['loggedin'] = "1";
    $_SESSION['email'] = $resemail;
    $_SESSION['username'] = $resusername;
    echo "Congrats, Your logged in"; // YAY
}else{
    // No, Lets mark them as invalid.
    $_SESSION['loggedin'] = "0";
    echo "Sorry, Invalid details"; // Nay
}

?>
</body>
</html>

Thoughts?

  • 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-04T20:17:00+00:00Added an answer on June 4, 2026 at 8:17 pm

    You haven’t quoted the password ‘value’ you’re inserting, so to MySQL it’s appearing as a mangled number.

    $query = "SELECT * FROM accounts WHERE password = '".$password."' LIMIT 1"; 
                                                      ^---missing   ^---missing
    

    or better yet:

    $query = "SELECT * FROM accounts WHERE password = '$password' LIMIT 1"; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically from a database I am getting data that is formatted like this nameofproject101
Basically, I get the error: -[UIViewController donePress:]: unrecognized selector sent to instance 0x6a7f7c0 ***
Basically what I want to do is get a list of stores the employee
Basically i'm trying to build a comment system. The user looks at a photo
Basically, what I want is to access the data between substrings (between name: and
Basically I want to achieve this workflow: Checkout from repository on windows system (or
Basically I have some variables that I don't want to preinitialize: originalTime = None
basically i have (state, state code) pairs, that are subsets of country [USA] ->
Basically I want to run a script checking for the existence of a certain
Basically what I need to do is write a function that takes in a

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.