Hey gents, im fairly new to this but have made some progress. I have something im working on and in the end result i want specific information from a specific team to be showen from a db. Can anyone look at this code and see what i may have done… Much thanks in advance…
$db_name=“vhamainsite”; // Database name
$tbl_name=“playerslist11”; // Table name
// Connect to server and select databse
mysql_connect("$host", “$username”, “$password”)or die(“cannot connect”);
mysql_select_db("$db_name")or die(“cannot select DB”);
$sql=“SELECT * FROM $tbl_name”;
$result=mysql_query($sql);
// Define $color=1
$color=“1”;
echo ‘
".$rows['Num']." | ".$rows['Name']." | ".$rows['Pos']." | ".$rows['Salary']." | ".$rows['Contract']." | ".$rows['Status']." | ".$rows['11/12Salary']." | ".$rows['12/13Salary']." | ".$rows['13/14Salary']." | ".$rows['Protected']." | ".$rows['Rookie']." |
".$rows['Num']." | ".$rows['Name']." | ".$rows['Pos']." | ".$rows['Salary']." | ".$rows['Contract']." | ".$rows['Status']." | ".$rows['11/12Salary']." | ".$rows['12/13Salary']." | ".$rows['13/14Salary']." | ".$rows['Protected']." | ".$rows['Rookie']." |
mysql_close();
?>
I need all players from the same team to show along with there stats there.
Thanks again, it helps me better understand…