sweet22
Sun 2nd Nov '03, 2:46pm
ok ive been trying to get this to work all day and i havent gotten it to work yet.
heres the link to the file: http://www.animationation.net/testin.php
im trying to extract some info from a table in a db but its not working
heres the code im using
1:<?php
2:
3:$connection= mysql_connect(localhost,username,pass);
4:$db="database"
5:mysql_select_db($db);
6:$query="SELECT * FROM xtd";
7:$info = mysql_query($db,$query,$connection);
8:while($object = mysql_fetch_object($info)){
9:$rank=$object->rank;}
10:echo"<html>";
11:echo"<body>";
12:echo"<b>$rank</b>";
13:echo"</body>";
14:echo"</html>";
15:
16:?>
i used username,pass, and database to hide my real info so dont say i should not have those there cause i know about em, but i dont get y it doesnt work. it keeps saying error on line 5
heres the link to the file: http://www.animationation.net/testin.php
im trying to extract some info from a table in a db but its not working
heres the code im using
1:<?php
2:
3:$connection= mysql_connect(localhost,username,pass);
4:$db="database"
5:mysql_select_db($db);
6:$query="SELECT * FROM xtd";
7:$info = mysql_query($db,$query,$connection);
8:while($object = mysql_fetch_object($info)){
9:$rank=$object->rank;}
10:echo"<html>";
11:echo"<body>";
12:echo"<b>$rank</b>";
13:echo"</body>";
14:echo"</html>";
15:
16:?>
i used username,pass, and database to hide my real info so dont say i should not have those there cause i know about em, but i dont get y it doesnt work. it keeps saying error on line 5