Hi,
Im having difficulty sendind a variable to another page that contains a space.
Eg.
Darts_Players Table
ID Playername
2 Doogie Howser
Code
<?
include"config.php3";
// create connection
$connection = mysql_connect($dbhost,$dbuser,$dbpass)
or die('Couldn"t make connection.');
// select database
$db = mysql_select_db($db, $connection)
or die('Couldn"t select database.');
$query='select * from Darts_Players';
// execute SQL query and get result
$sql_result1 = mysql_query($query,$connection)
or die("Couldn't execute query.");
// start results formatting
echo "
<br><br>
<p><font face='Verdana' size='2'><b>Players In Database Already:</b></font></p>
<table border='1' cellspacing='1' style='border-collapse: collapse' bordercolor='#000066' width='45%' cellpadding='5'>
<tr>
<td bgcolor='#B5CBEF' height='17' width='18%' bordercolor='#FFFFFF' background='tile_back.gif'>
<p align='left'><b><font face='Verdana' size='2' color='#FFFFFF'><font face='Verdana' size='2'><b>ID</b></font></td>
<td bgcolor='#B5CBEF' height='17' width='79%' bordercolor='#FFFFFF' background='tile_back.gif'>
<p align='center'><font face='Verdana' size='2'><b>Player Name</b></font></td>
<td bgcolor='#B5CBEF' height='17' width='85%' bordercolor='#FFFFFF' background='tile_back.gif'>
<p align='center'><font face='Verdana' size='2'><b>Select</b></font></td>
</tr>";
// format results by row
while ($row = mysql_fetch_array($sql_result1)) {
$id1 = $row["id"];
$name = $row["playername"];
echo "
<tr><td bgcolor='#EFF3F7' height='16' width='18%' bordercolor='#FFFFFF'>
<font size='2' face='Verdana'><font face='Verdana' size='2' color='#000066'>$id1</font></font></td>
<td bgcolor='#EFF3F7' height='16' width='82%' bordercolor='#FFFFFF'><font face='Verdana' size='2' color='#000066'>$name</FONT></td>";
echo "
<td bgcolor='#EFF3F7' height='16' bordercolor='#FFFFFF'><a href=SGS_Player.php3?name='$name'><font face='Verdana' size='2' color='#000066'>Select</a></tr>
";
}
?>
</TABLE>
<?
// free resources and close connection
mysql_free_result($sql_result1);
mysql_close($connection);
?>
Now when i run the script all i get is the first part of the variable being sent
ie
http://www.host.com/Player.php3?id=Doogie
when i want it to be...
http://www.host.com/Player.php3?id=Doogie Howser
Ive searched the forums, and tried differing methods before posting. So any help would be good.