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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:14:37+00:00 2026-06-13T10:14:37+00:00

below is the index.html which shows the user the password and email entry forms

  • 0

below is the index.html which shows the user the password and email entry forms

<!DOCTYPE html>
<html lang="en">
<head>


<title>Ryan Kelly</title>

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="main.css" rel="stylesheet">

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>


<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35774778-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async =               true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') +       '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

</head>
<body>
<?php include 'comments.php'; ?>

<div class="container">

<div class="centre">

<div class="well">
    <h1 class="titlecomment">Comment System</h1>

    <h4 class="instructions">Please login below with your username and      password</h4>

    <form class="form-horizontal">
  <div class="control-group">
  <label class="control-label" for="inputEmail">Email</label>
  <div class="controls">
  <input type="text" id="inputEmail" placeholder="Username" method="post">
  </div>
  </div>
  <div class="control-group">
  <label class="control-label" for="inputPassword" >Password</label>
  <div class="controls">
  <input type="password" id="inputPassword" placeholder="Password" method="post">
  </div>
  </div>
  <div class="control-group">
  <div class="controls">

   </div>
  </div>
  </form>

  <div class="greenbutton">
  <button type="submit" class="btn btn-success" method="login()">Login</button>
  </div>

  </div>
  <div class="footer">Created by Ryan Kelly</div>

  </div>

 </div>

and below is the PHP script which checks the email and password and then redirects the user to google, i only redirecting because i wanted to see if it logged in successfully

            <?php        

            function login() {


    $connection = mysql_connect($host, $databaseUsername, $databasePassword);

    $username = $_POST['inputEmail'];
    $password = $_POST['inputPassword'];

    mysql_select_db($connection);

    $queryUsername = "SELECT * FROM login WHERE Username='$username'";
    $queryPassword = "SELECT * FROM login WHERE Password='$password'";

    $searchQuery = mysql_query($queryUsername);
    $searchQueryDatabase = mysql_query($queryPassword);

      if($searchQuery && $searchQueryDatabase = $username && $password) {

        header('Location: http://www.google.co.uk');
      }

}
?>
  • 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-13T10:14:40+00:00Added an answer on June 13, 2026 at 10:14 am

    hre is the problem

    if($searchQuery && $searchQueryDatabase = $username && $password) {
    

    you are not fetching the result, and also using assignment (=) when you likely mean comparison (==).

    for and example

    try $row = mysql_fetch_array($searchQueryDatabase);

    now try something like

    if($searchQuery && $row['Username'] == $username && $row['Password']==$password) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basicily i have a index.html shown below.. <html> <head> <title>UI Test: Main Menu</title> <script
I have map.html which shows a US map and address details below it: <img
I am loading a WebView in an Android application with the below code: mWebView.loadURL(https://wat.harminson.com/html/index.html);
I am trying to use an image in the below index.jsp file in a
I'm writing a SQL embedded in C program with tables below: table index:id, xx
How can I index the array below, array ( [1403847357564066] => Array ( [quantity_request]
I had used the below code to get the row index of the UIPickerView
I've been receiving errors with the following code below saying that the index is
on $(document).ready(function() in index.php, the below AJAX is executed, running the file getData.php: if
On click (animate) slide to left and go last with z-index. the eg below

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.