What's wrong with what you are using? What you are doing is a bit basic. What you need is to store all the usernames and passwords either in a file or database. In this example I will use an array to store username and password a design which can be easily extended manually.
// a make user array
$users = array('abc' => '123');
// check user exists or exit
if(!array_key_exists($_GET['name'], $users))exit('Naughty Naughty');
// check password corresponds with user or exit
if($users[$_GET['name']] != $_GET['pass'])exit('Naughty naughty');
print 'Hello '.$_GET['name'];