I forgot to put in my email address to get my answer. Sorry about that.
Anyway, here it is again. On line 3 above in the "login.php", you point to checklogin.php, however, you state in the next code to build a "logincheck.php". Took me a minute on that one. Got it though. Now, after researching for a while, I find that my database is on a different server than localhost, so after that, I find the code to use to connect to the database in 1and1.com is the following:
//ENTER YOUR DATABASE CONNECTION INFO BELOW:
$hostname="db1111111111.db.1and1.com";
$database="db1111111111";
$username="dbo111111111";
$password="myPassword";
Of course, I have to insert my host name, database name, username and password as in the database on the server. However, when I do this and use your code from "// Connect to server and select database" down, I keep getting "Wrong username or password". When I use the code that 1and1.com gave me to connect to the database (all it does is connects), then no matter what id or password I use, it comes back and tells me I've connected.
Can you help?