(Ja, kallt som Perkele. Och i Göteborg är det dessutom fuktig luft.)
There seems to be a bunch of things here for me to understand. But in order not to blow my brain up, I'm asking one thing at a time.
I'm now trying this version, partially influenced by your suggestions:
<?php
echo "trying to connect to the database server<br />";
$link = mysqli_connect("localhost", "root", "password")
or die("connection to server failed");
echo "trying to connect to the database<br />";
$result = mysqli_select_db($link, "klasbas")
or die( mysqli_error($link) );
?>
With this code, i get this in the browser:
trying to connect to the database server
trying to connect to the database
And as I said before, It seems to establish contact with the server, since if I , for example, change the host name to "localhäst", i get this in the browser:
trying to connect to the database server
connection to server failed
As for the latter half of the code, i guess it IS connecting to the database, since when I change the database name (in the code, not in the database) to "klasbus", I get this:
trying to connect to the database server
trying to connect to the database
Unknown database 'klasbus'
BUT if I change the name of the "$link" variable to "$ullared" (on it's second appearance in the entire code) I get no error! Why?
Am I, with this code, really connected to both the server and the database, and how can I know for sure?
Regards
Klas