Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>$sql="SELECT * FROM customer WHERE name='" . $myusername . "' and cid='" . $mypassword . "'"; // fix this line if ($count === 1){ // and fix this line if (result === 1){ // and this line </code></pre> <p>It looks to me that you're using code from different places. You should be validating that the username / password combination exists, not checking to see if it is available. </p> <p>Nobody is going to do your homework for you, sorry. Here's a good reason why..</p> <pre><code>&lt;?php session_start(); require_once ('db_connect.php'); if(isset($_POST['pswrd']) &amp;&amp; isset($_POST['userid'])) { $sql = "SELECT * FROM users WHERE username='".mysqli_real_escape($dbc, trim($_POST['userid'])."' AND password= '".mysqli_real_escape($dbc, trim($_POST['pswrd'])."'"); $result = mysql_query($dbc, $sql) or die("Could Not make request"); if(mysql_num_rows($result) == 1) { //redirect to the welcome page } else { echo "User Not Found"; } } ?&gt; </code></pre> <p>You're mixing <code>mysql</code> and <code>mysqli</code> here. You should be using JUST <code>mysqli</code>! Your <code>userid</code> and <code>pswrd</code> variables get assigned to <code>username</code> and <code>pass</code> in the AJAX call but the <code>check_login.php</code> script never sees them. It's still looking for <code>userid</code> and <code>pswrd</code>. You've got too many errors and you don't seem to be very responsive about getting them fixed. Besides, we're not a <strong>homework</strong> site.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload