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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:31:14+00:00 2026-05-26T23:31:14+00:00

HTML: Html of the two forms, looks like: when either buyer or merchant is

  • 0

HTML:

Html of the two forms, looks like:
img1

when either buyer or merchant is selected..
img2

        <form action="#" method="post"> 
                Buyer <input type="radio" name="addType" value="Buyer" /> 
                &nbsp;&nbsp;Merchant <input type="radio" name="addType" value="Merchant" /><br />
                New PricedWrite User? <a href="../register">Register</a>
        </form>
        <div class="buyer">
            <form method="post" action="check_buyer.php">
                Username or Email: <input class="UserReg" style="width:350px;" type="text" name="userName" /> <br />
                Password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input class="UserReg" style="width:350px;" type="password"  name="userPass" /> <br />
                <input type="submit" class="UserReg" name="submit" value="Sign In" />
            </form>
        </div><!--/buyer-->
        <br />
        <div class="merch">
            <form method="post" action="check_merchant.php">
                Username or Email: <input class="UserReg" style="width:350px;" type="text" name="userName" /> <br />
                Password: <input class="UserReg" style="width:350px;" type="password" name="userPass" /> <br />
                <input type="submit" class="UserReg" name="submit" value="Sign In" />
            </form> 

check_buyer.php (which is in same directory as html file)

<?php
require_once('../inc/db/dbc.php');
$connect = mysql_connect($h, $u, $p) or die ("Can't Connect to Database.");
mysql_select_db($db);

$LoginUserName = $_POST['userName'];
$LoginPassword = mysql_real_escape_string($_POST['userPass']);
//connect to the database here
$LoginUserName = mysql_real_escape_string($LoginUserName);
$query = "SELECT uUPass, dynamSalt
        FROM User
        WHERE uUName = '$LoginUserName';";
$result = mysql_query($query);
if(mysql_num_rows($result) < 1) //no such user exists
{
    echo "No Such User";
}
$ifUserExists = mysql_fetch_array($result, MYSQL_ASSOC);

$dynamSalt = $ifUserExists['dynamSalt'];  #get value of dynamSalt in query above
$SaltyPass = hash('sha512',$dynamSalt.$LoginPassword);


if($SaltyPass != $ifUserExists['uUPass']) //incorrect password
{
    echo "No Such Pass<br />";
    echo '$LoginPass Value: '.$LoginPassword;
}

else
{
echo "Success";
}

?>

Currently, when I type in a valid user and pass, it basically just reloads the page. What is wrong with this?

The way I originally create the pass upon registration is:

if(!empty($_POST['userPass']))
    $escapedInputtedPass=mysql_real_escape_string($_POST['userPass']);
    $dynamSalt = mt_rand(); 
    $SaltyPass = hash('sha512',$dynamSalt.$escapedInputtedPass);

Why isn’t this matching the way I check it? The only difference is, it doesnt have to generate the pass, because the pass in now stored under the dynamSalt column in the user table. Anyone see anything??
$SaltyPass = hash(‘sha512’,$dynamSalt.$escapedInputtedPass);

  • 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-26T23:31:15+00:00Added an answer on May 26, 2026 at 11:31 pm

    I tink you have error in query:

    $query = "SELECT uUPass, dynamSalt
            FROM User
            WHERE uUName = '$LoginUserName';";
    
    //change to
    
    $query = "SELECT uUPass, dynamSalt
            FROM User
            WHERE uUName = '$LoginUserName'"; //semicolon removed
    
    

    Hope that works

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

Sidebar

Related Questions

In my HTML code, I have a form tag that contains two input boxes,
I have a webpage that looks like: <html> <head> <title>Hi</title> </head> <body> <form name=mainForm
A form on my website's contact -us HTML page has two fields 1) subject
I found out that HTML form supports only two enctype types. They are application/x-www-form-urlencoded
hello friends i am having two frames, each frame has a html form which
I'd like two different HTML elements that are at the same nesting level to
I have some checkbox that looks like this <%= Html.CheckBox(Remember) %> <%= Html.Label(Remember, Keep
I'm working with a HTML form that accepts 4 dates, two of which are
Let's imagine a HTML-form with with two submit buttons. one of them is positioned
I have those two html radio buttons and textarea. I basically want to enable

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.