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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:59:57+00:00 2026-06-08T21:59:57+00:00

The problem is that I am simply trying to login with this script and

  • 0

The problem is that I am simply trying to login with this script and the only times I can make it work is if I take out the lines retrieving the salt from the database based off of the username provided and put in the hashed password manually. The weird part about this whole problem is this is the exact way I do it on another site I made and it works flawlessly. What happens is that it blanks the page and doesnt even show an error. If anyone has a solution I would be very happy to hear them or suggestions about a better way to do this.

<?php
include 'includes/calendar-functions.php';
//user login
if(isset($_POST['membership_id']) && isset($_POST['user_password']) && $_POST['membership_id'] != "" && $_POST['user_password'] != "" ) {
    //Setting up VARS
    $newUsername = mysql_real_escape_string($_POST['membership_id']);
    $newPassword = mysql_real_escape_string($_POST['user_password']);
    $saltQuery = 'SELECT `salt` FROM `vintage_user` WHERE membership_id = '.$newUsername;
    $resultSalt = mysql_query($saltQuery, $connect) or die( mysql_error() );

    while ($row = mysql_fetch_assoc($resultSalt)) {
        $salt = $row["salt"];
    }

    $saltedPW =  $newPassword . $salt;
    $hashedPW = hash('sha256', $saltedPW);

    // QUERYING DB FOR USERNAME AND PASSWORD
    $query = 'SELECT *
        FROM vintage_user
        WHERE membership_id = "'.$newUsername.'"
        AND user_password = "'.$hashedPW.'"
        AND approved = "1"
        LIMIT 1';
    $result = mysql_query( $query, $mysql ) or die( mysql_error() );

    if( mysql_num_rows( $result ) == 1 ) {
        list( $_SESSION['user_first'],
            $_SESSION['user_last'],
            $_SESSION['user_id'],
            $_SESSION['user_email'],
            $_SESSION['membership_id'] ) = mysql_fetch_row( $result );
        header( 'location:'.'calendar.php?m='.$month.'d=1&y='.$year );
        die();
    }
    else {
        echo '<p class="incorrect">Incorrect login and/or password</p>';
    }
}
  • 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-08T21:59:59+00:00Added an answer on June 8, 2026 at 9:59 pm

    If magic_quotes_gpc is enabled, first apply stripslashes() to the data. Using this function on data which has already been escaped will escape the data twice.

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

Sidebar

Related Questions

I'm trying to make a simple login script that will check the inputted username
I am trying to work with a simple HTTPService. The problem is that my
Simple problem that I can't figure out... How can I print a '%' character
I have a problem, i have a query that just simply displays the user
I followed this guide as an attempt to write a login script for my
I'm currently trying out Silverlight with RIA Services. I'm implementing a simple login form.
How do I make a form that can log into two places simultaneously? http://img577.imageshack.us/img577/3127/calendarlogin.jpg
Hey, I've come across a strange problem. I'm trying to launch an activity that
Now I'm trying to work with System.Web.Routing. All is just fine, but I can't
I'm a (junior) pen tester and I'm trying to make a script to demonstrate

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.