Ant59
New Member
- Messages
- 72
- Reaction score
- 0
- Points
- 0
My friend has started a website at www.kickjam.elementfx.com. He wants to be able to connect to my database at www.dgaming.exofire.net (www.dgaming.co.uk). I have added him into my remote mysql access page in cPanel and added the user kickjam to my database. The code on his site is this:
I have also tryed the host as www.dgaming.co.uk:3306.
Code:
<?php
$dbhost = 'www.dgaming.co.uk';
$dbuser = '*****_kickjam';
$dbpass = '*************';
$dbname = '*****_smf';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to MySql');
mysql_select_db($dbname);
$query = "SELECT * FROM smf_members";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
echo $row['realName'];
mysql_close($conn);
?>
I have also tryed the host as www.dgaming.co.uk:3306.
Last edited: