I have used a mysql query to receive a variable and placed it in a link. The problem is when the variable contains two words it only displays the first in the link.

eg. if the variable contained the words 'tim tam' after the query this is what would happen

THE CODE

mysql_connect(l ocalhost,$usern ame,$password);
@mysql_select_d b($database) or die( "Unable to select database");
$query="SELECT...