Click to See Complete Forum and Search --> : MySQL webpage connection problem


pepy
January 12th, 2004, 10:18 PM
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>

pepy
January 14th, 2004, 04:37 PM
come on guys!!!!!!!!!

someone must know what i am doing wrong, something i missed?

i have run out of ideas.

please help

Thank you
pepy