[php] <?php
// Create connection
$con=mysqli_connect(“localhost:3307”,“root”,“usbw”,“fut”);
// Check connection
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
//run a simple select statement
$result = mysqli_query($con,“SELECT Cost FROM cards WHERE PlayerID = 2”);
//output the results to the page
while($row = mysqli_fetch_array($result))
{
echo $row[‘Cost’];
echo “
”;
}
//close the connection
mysqli_close($con);
?> [/php]