View Single Post
Old 30-07-2005, 23:43   #4
iron25
Inactive
 
Join Date: Aug 2003
Location: nowhere
Posts: 718
iron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful one
Re: PHP/SQL Help Please

Quote:
Originally Posted by Raistlin
Any idea where I need to include the username?
__________________

I just tried replacing [My Database] with the URL for my site and got no joy, I'm assuming it's trickier than that.

Anybody successfully connecting to an I-Web MySql database got any idea what the path needs to be?

What is the url you are using?

If you are running the php on the box itself then you can just use localhost as shown below:

$username = "name";
$password = "password";
$hostname = "localhost";

$dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to mysql");

The username & password is the username & password for the mysql database. I've never used I-Web so I can only assume that there must be just one username that is global to your account.

It might be worthwhile checking their website as you might need to specify a port to connect on.
iron25 is offline   Reply With Quote