Hi, I am a complete noob. A while ago I paid a guy to make a little program that used mysql and he installed it on my machine - more recently I decided to give php/mysql a go and bought kevin yanks book. Following one of the earliest tutorials in there I have hit a problem. I have installed XAMPP and via the phpmyadmin I can see databases I have created, but when i try and access them with the following code it gives me the error specified.
$link = mysqli_connect('localhost', 'root', '50364321');
$output = 'Unable to connect';
if (!mysqli_set_charset($link, 'UTF8'))
$output = 'Unable to set Encoding';
if (!mysqli_select_db($link, 'covers'));
$output = 'Unable to select Database';
$output = 'Database Connection Established.';
It gets to the 3rd query mysqli_select_db and fails, printing the 'unable to select database' error, i can see it is there, I have triple checked the spelling and even tried it on another database and it still doesnt work.
Im sure this is simple to solve and im just stupid but i appreciate any attempts to help greatly as this is annoying me now.
Databases are there, apache and mysql are running in xampp, database name is spelt correctly - still cant find db.
It seems like a problem with the way msql has installed (i did previously have mysql installed in order to run a program which i had a programmer design for me)