This is the login php script, I don't get no errors or echos so I have no idea what's going on. The "\*'s" is me censoring that info. If you would like to see the live page it is [here](http://atsbusinessandgames.com/Login/).

```
<?php
printf("Client library version: %s\n", mysqli_get_client_info());

session_start();

$username = $_POST['username'];
$password = $_POST['password'];
var_dump('test');
if (!empty($username) && !empty($password)){
    echo $username
    echo $password

$connect = mysql_connect("localhost", "atsbusin_atsbusin", "Andrew85") or die ("Failed to connect to DB");
mysql_select_db("atsbusin_users") or die ("failed to select DB");

$query = mysql_query("SELECT * FROM users WHERE username='$username'");
$numrows = mysql_num_rows($query);
    if ($numrows != 0)
        {
            while ($row = mysql_fetch_assoc($query))
            {
                $dbusername = $row['username'];
                $dbpassword = $row['password'];
            }

                if ($username == $dbusername && $password == $dbpassword)
                {
                    echo "Login Success!";
                    $_SESSION['username'] == $dbusername;
                } else {
                    echo "Incorrect password!";
                }

        } else {
            die("invalid username, check the spelling or register that name");
        }

}
    echo 'something'
?>

```

This is the final working code, thanks to all who helped! Now for me to switch over to mysqli and do the security measures suggested (have a feeling I'll be back ☺ )

```
<?php

session_start();

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

$connect = mysql_connect("localhost", "atsbusin_atsbusi", "Andrew85") or die ("Failed to connect to DB");
mysql_select_db("atsbusin_users") or die ("failed to select DB");

$query = mysql_query("SELECT * FROM users WHERE username='$username'");
$numrows = mysql_num_rows($query);
            while ($row = mysql_fetch_assoc($query))
            {
                $dbusername = $row['username'];
                $dbpassword = $row['password'];

            }

            if ($username == $dbusername && $password == $dbpassword)
            {
                echo "Login Success!";
                $_SESSION['username'] = $dbusername;
            } else {
                echo "Incorrect password!";
            }
?>

```