i have made a mysql database at freesql.org
i can connect to it using different myadmin progams.
but i cant for the life of me connect to it using a web page??
For "weeks" i have tried many different ways using php.
freesql.org is not my server, this may have something to do with it??
I have tried 100s of different ways to connect to it....
below is one of the ways i have tried....
Maybe one of you can see what i am doing wrong
Please help
Thank you
Pepy
<html>
<head>
<TITLE></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html">
</head>
<BODY>
<?
$username="xxxxxxxxxxxxxx";
$password="xxxxxxxxxxxxxx";
$database="dbsell";
$db = mysql_connect("freesql.org", $username, $password);
@mysql_select_db(dbsell) or die( "Unable to select database"
$query="SELECT * FROM t1";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Database Output</center></b><br><br>";
$i=0;
while ($i < $num) {
$domain=mysql_result($result,$i,"name"
$code=mysql_result($result,$i,"code"
echo "<b>$domain $code</b>";
++$i;
}
?>
</body>
</html>
i can connect to it using different myadmin progams.
but i cant for the life of me connect to it using a web page??
For "weeks" i have tried many different ways using php.
freesql.org is not my server, this may have something to do with it??
I have tried 100s of different ways to connect to it....
below is one of the ways i have tried....
Maybe one of you can see what i am doing wrong
Please help
Thank you
Pepy
<html>
<head>
<TITLE></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html">
</head>
<BODY>
<?
$username="xxxxxxxxxxxxxx";
$password="xxxxxxxxxxxxxx";
$database="dbsell";
$db = mysql_connect("freesql.org", $username, $password);
@mysql_select_db(dbsell) or die( "Unable to select database"
$query="SELECT * FROM t1";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Database Output</center></b><br><br>";
$i=0;
while ($i < $num) {
$domain=mysql_result($result,$i,"name"
$code=mysql_result($result,$i,"code"
echo "<b>$domain $code</b>";
++$i;
}
?>
</body>
</html>