I think you're might be overwriting a variable that WordPress needs to display the page.
To reduce frustration for all parties involved, I'm just gonna go ahead and post a shortcode plugin that you can use to do EXACTLY what you're attempting using shortcodes.
PHP Code:
<?php
/*
Plugin Name: Simple Shortcode
Plugin Author: Will Anderson
Plugin URI: http://www.itsananderson.com/
*/
// Usage:
// [player name='First-Last' /]
function handle_player($atts = array(), $content = null) {
$playerName = addslashes($atts['name']);
$con = mysql_connect("localhost","jwrbloom_","redcoach");
mysql_select_db("jwrbloom_wpspselect", $con);
$query = "SELECT * FROM team2011 WHERE CONCAT(nameFirst, '-', nameLast) = '$playerName' ORDER BY uniform ASC";
$results = mysql_query($query);
while($line = mysql_fetch_assoc($results)) {
echo '<div>' . $line['nameFirst'].' '.$line['nameLast'] . '</div>';
}
}
add_shortcode('player', 'handle_player');
?>
If you install this bad boy, you'll just need to go into your player pages and add the following code to get the appropriate player info.
Code:
[player name="First-Last" /]
of course, replace the first and last name here with the actual first and last name of the player on each page.
You'll probably need to hack the plugin code a little to get it to display exactly what you need, but I've given you all the structure need.
please somebody (Otto) correct me if any part of this is incorrect.