before you write this check you need to see what $row looks like when a username pass is not found. but I think you should be able to do this:
```php
<?php

if (empty($row)) {
    // redirect
}