connect_errno ) { die( "Failed to connect to MySQL: (" . $con->connect_errno . ") " . $con->connect_error ); } // Fetch the data $query = "SELECT * FROM `player history` WHERE `Player ID`='".$_GET['id']."';"; $result = $con->query( $query ); // All good ? if ( !$result ) { $message = 'Invalid query: ' . $con->error . "\n"; $message .= 'Whole query: ' . $query; die( $message ); } // Print out rows $data = array(); while ( $row = $result->fetch_assoc() ) { $data[] = $row; } echo ''; // Close the connection mysqli_close($con); ?>