phpMyAdmin Connection Issue

I am using a mac with Dreamweaver CS4, XAMPP and phpMyAdmin.

I cannot figure out why this code won’t work? Are some of the codes not compatible with my OS?

Every time I try and log in with the username and password I have entered in the database already I get my error message for leaving the fields blank: “Please enter username and password.”

<?php

$username = $_POST[‘username’];
$password = $_POST[‘password’];

if ($username&&$password)
{

$connect =mysql_connect(“localhost”,“root”,“password”) or die (“Couldn’t connect.”);
mysql_select_db(“phplogin”) or die (“Couldn’t find db”);

}

else
die (“Please enter a username and password.”);

?>

Any help would be much appreciated.

Thank you, in advance.