Hello,

my goal is to connect to a MySQL database using php.

I am using:

  • IIS
  • php 5
  • MySQL 5


the code I'm using to try and connect to the database looks something like this:

Code:
<?php

$db = mysql_connect("localhost", "root", "mypassword");

echo "connection attempted";
?>
but the code doesn't even get to the echo command after the mysql_connect command!

so how am I supposed to set up the database so that I can access it? have I missed something out?

thanks