OK All,
Starting off with MySql and have a really stupid question. I have a DB set up but can't seem to even get the connection right...
I have a page that I want to connect to the DB and just say ok but it does not work.. I ave an incling that it's the "localhost" bit but could be wrong..!!
Code:
<?php
$link=mysql_connect("localhost", "ash", "jessica1");
if(mysql_select_db("mysql", $link)) echo "connected to DB";
Else die ("Connection failed");
?>
Could someone let me into the secret of connecting to my DB.
Thanks
Ash