Hi There,
I would like my webpage title to change for each sub-site that I visit say I go to player A I want the website name to say CNGHLDB-Player A and If I go to player B profile it would change to say CNGHLDB-Player B I have the names in my php script so I am assuming it shouldn’t be to hard to do the coding for it, but I am not sure how to do it.
[php]CNGHLDB
<? // Connects to your Database mysql_connect("", ", "") or die(mysql_error()); mysql_select_db("") or die(mysql_error()); //Get PlayerID from URL $iPlayerID = $_GET["PlayerID"]; $iNationID = $_GET["NationID"]; $oPlayerInfo = mysql_query(" SELECT Players.PlayerID, Players.FirstName, Players.LastName, Players.Position, Players.Height, Players.Weight, Players.DOB, CNGHLTeams.CNGHLRights, NHLTeams.Team, Players.CNDraftYR, DraftTeam.DraftID, Players.CNDraftPOS, Countries.Nation, Players.NationID, DraftTeam.DrTeam FROM Players Left JOIN CNGHLTeams ON Players.CNGHLID=CNGHLTeams.CNGHLID Left JOIN NHLTeams ON Players.TeamsID=NHLTeams.TeamID Left JOIN Countries ON Players.NationID=Countries.NationID Left JOIN DraftTeam ON Players.DraftID=DraftTeam.DraftID WHERE Players.PlayerID=$iPlayerID ORDER BY Players.LastName; ") or die(mysql_error()); while($row = mysql_fetch_array($oPlayerInfo)) { Print ""; ECHO ""; ECHO " | "; ECHO " | "; ECHO " |
"; Print "
".$row['FirstName']." ".$row['LastName']." | ";
Print "||
Birthdate: ".$row['DOB']." | "; $DOB = $row[DOB]; //dd.mm.yyyy $user_date = new DateTime($DOB); $curr_date = new DateTime(); $age_cal = $curr_date->diff($user_date); Print "Age: ".$age_cal->y;" | "; Print "|
Nation: ".$row['Nation']." | "; Print "CNGHL Team: ".$row['CNGHLRights']. " | "; Print "|
Position: ".$row['Position']. " | "; Print "Weight: ".$row['Weight']. " | "; Print "|
Height: ".$row['Height']. " | "; Print "NHL Team: ".$row['Team']. " | "; Print "|
Draft Year: ".$row['CNDraftYR']." | "; Print "Draft Position: ".$row['CNDraftPOS']." | "; Print "|
Drafted By: ".$row['DrTeam']." | "; Print ""; Print " | |