What I am doing:
function getTeamNames()
{
if($link_id = mysql_connect(\"192.168.1.3\", \"PhantomStatsUser\", \"PhantomS
tatsUser\"))
{
$select = mysql_select_db(\"PhantomStats\");
$sql = \'SELECT TeamName FROM Teams\';
if($result = mysql_query($sql))
{
$x = 0;
while ($query_data = mysql_fetch_array($result))
{
$x++;
echo \"<option value=\'\" + $x + \"\'>\" + $query_data[\'TeamName\'];
}
}
}
mysql_close($link_id);
}
the function is being called as such:
<form>
<select name=\"HockeyTeam\">
<?php
getTeamNames();
?>
</select>
</form>
When I view the source of what is displayed I get this:
<form>
<select name=\"HockeyTeam\">
12345678910</select></form>
Definitely not the indended result. Idealy the end result will be such that the team names will be within the forms menu for the user to select.
As always help is always appreciated. Thank you in advance
Shaun Bramley