Hi
I enclose my code
I seem to have sorted the space problem on variable($Manufacturer)...("Smith Jones"

..(not $name which I used as example) .. by inserting double quotes in the href link codeing .. this sends the variable back ok including the space.....the name or manufacturer name I originally had trouble with was "Smith & Jones" ......I realised that the "&" was also causing a problem..so I missed it out...... Can u confirm that mysql or php does not like "&"
Many thanks
Hotlips
<html><head><title>W&WCOUK</title>
<link rel="stylesheet" type="text/css" href="wandw.css">
<script language=JavaScript src=catlist.js type=text/javascript></script>
<script language=JavaScript src=stdinc.js type=text/javascript></script>
<script language=JavaScript type=text/javascript>
</script>
<?php>
//session_start() ;
include_once("dbconnectwandw.php"

;
$page="";
$Manufacturer="Startup";
$range="";
$page=$_REQUEST['page'];
$Manufacturer=$_REQUEST['Manufacturer'];
$range=$_REQUEST['range'];
// $page="";
// $Manufacturer="";
$today = date("l"

." ".date("d F Y"

;
$string=""
//echo ($page) ;
//echo ($Manufacturer) ;
?>
</head><body>
<div style='position:absolute;top:0px;left:0px;visibility:hidden;color:#000000;background-color:#000000'>
</div>
<div style='position:absolute; left:1; top:0; width:780' >
<div style='position:absolute; left:0; top:0; width:779; height:119'><img src=images/wwetc2.gif width=779 height=120>
<!-- *********** create top menu ********* -->
<div style='position:absolute; left:0; top:95; width:779; height:24'>
<table class=menu4 width=779>
<tr><th><a href="index.php?page=Home">Home</a></th><th><a href="index.php?page=aboutus">About us</a></th><th>Home</th><th>Home</th><th>Terms & conditons</th><th>Contact us</th></tr>
</table>
</div>
<!-- ***************** end top menu ************* -->
</div>
<!-- <div style='position:absolute; left:0; top:0; width:779; height:50'><img src=images/quadtrader_background.gif width=779 height=500></div> -->
<div style=' z-index:2; position:absolute; right:10; top:10; text-align:right; color:#000000'><?php echo($today)?><br></div>
<div class=Main2 style='position:absolute; width:119; left:1; text-align:left; top:119; height:500'>
<?php
//**************** Do query to get list of products categories and descriptions for left menu************************
$sqlcat = "SELECT * FROM Category";
$resultcat = mysql_query($sqlcat, $conn) or die(mysql_error());
//**************** Do query to get list of manufacturers.by category..ie wallpapers..fabrics ************************
$sql1 = "SELECT DISTINCT c1.Category, c1.Manufacturer, c2.categoryno, c2.categorydesc
FROM stockcatalog AS c1, category AS c2
WHERE c1.category = c2.categoryno
GROUP BY c1.category, c1.manufacturer";
$result1 = mysql_query($sql1, $conn) or die(mysql_error());
//$myrow= mysql_fetch_array($result1);
//$rangename=$myrow1['range'];
// if (mysql_num_rows($result1)>0){ //does the range already exist?
$stylepicked="style='color: green '" ;
//**************** Do query to get Range or collection from selected manufacturer ************************
$sql = "SELECT DISTINCT range FROM stockcatalog WHERE category = '$page' and Manufacturer = '$Manufacturer'";
$result = mysql_query($sql, $conn) or die(mysql_error());
//************ loop through query result and create sub list of ranges/collections ***********************add at end of field to print cell border if cell empty
while ($myrow = mysql_fetch_array($result))
{
$string.=" <a href="."\""."/index.php?page=".$page."&Manufacturer=".$Manufacturer."&range=".$myrow['range']."\"";
//if (($page==$myrowcat['categoryno'])&&($Manufacturer==$myrow1['Manufacturer'])&&($range==$myrow['range'])) {
if ($range==$myrow['range']) {
$string.=" style='color: green'";
$s="OKOK" ;
}
$string.=">".$myrow['range']."</a><br>\n" ;
//$string.=" ".$myrow['range']."</a><br>\n" ;
}
?>
<!--**************** create LEFT menu from earlier querys(sqlcat) to database *********************************************** -->
<table class=menuLeft>
<?php
while ($myrowcat = mysql_fetch_array($resultcat)) {
echo("<tr><th>".$myrowcat['categorydesc']."</th></tr><tr><td>"

; // list CATEGORIES
mysql_data_seek($result1,0); // put the array pointer to the start of the array
while ($myrow1 = mysql_fetch_array($result1)) {
if ($myrow1['Category']==$myrowcat['categoryno']) {
// echo($myrow1['category']) ;
echo("<a href="."\""."/index.php?page=".$myrow1['Category']."&Manufacturer=".$myrow1['Manufacturer'])."\"" ;
//************ change font color to green for selected manufacturer
if (($page==$myrowcat['categoryno'])&&($Manufacturer==$myrow1['Manufacturer'])) {
echo (" style='color: green'"

;
}
echo (">".$myrow1['Manufacturer']."</a><br>\n"

; // list MANUFACTURES
if (($page==$myrowcat['categoryno'])&&($Manufacturer==$myrow1['Manufacturer'])) {
$catdesc=$myrowcat['categorydesc']; // get the category desc for main section of page
echo($string) ;} // create list of RANGES OF CATEGORIES by SELECTED MANUFACTURER
}
}
echo("<br><br></td</tr>"

; // put spaces between categories
}
// echo ($page) ;
// echo ($Manufacturer)."<br>";
// echo ($range)."<br>";
// echo $_GET['Manufacturer'] ;
//**********end of left menu ************************************************
?>
</td</tr>
<?php
?>
<style type="text/css" ><!-- CAPTION {color: blue; font-size=10pt} --></style> <!--- ******** STYLE ***** -->
</div>
<!-- ********* create MAIN section of page **************************************** -->
<div class=main2 style='position:absolute; left:120; top:0; width:658; height:500'>
<?php
// ********** first create details of ALL RANGES by manufacturer as per category ***************
if (($page>0)&&($Manufacturer<>Startup)&&($range==""

){
//********** Do query to FULL Range of ALL collection from selected manufacturer of ALL categories************************
$sql2a = "SELECT * FROM stockcatalog WHERE category = '$page' and Manufacturer ='$Manufacturer'";
$result2a = mysql_query($sql2a, $conn) or die(mysql_error());
//************ loop through query result and create table ***********************add at end of field to print cell border if cell empty
$string2a.="<table class=menu5 width=658 ><Caption align=top>".$catdesc." by ".$Manufacturer."</caption><tr><th>StockID</th><th>Pattern No</th><th>Description</th><th>Price</th><th>Prod code</th><th>Width/<br>Depth</th><th>Pattern Repeat</th><th>Sample</th></tr>";
while ($myrow2a = mysql_fetch_array($result2a)) {
$string2a.="<tr><td>".$myrow2a['stockID']."</td><td> ".$myrow2a['patternname']."</td><td>".$myrow2a['description']."</td><td> ".$myrow2a['price']."</td><td> ".$myrow2a['productcode']."</td>
<td>".$myrow2a['width']."<br>".$myrow2a['depth']."</td><td> ".$myrow2a['patternrepeat']."</td>
<td><a href='../images/{$myrow2a['pix2']}' border='0'><img src='../images/{$myrow2a['pix1']}' border='0'width='100' height='80'></a></td></tr>\n" ;
}
echo ($string2a);} //create table of ALL RANGES in ALL CATEGORIES
//**************************** now do JUST the RANGE in category ONLY ***********************************************************
if (($page>0)&&($Manufacturer<>Startup)&&($range<>""

){
//$stylepicked="<style='color: green'>" ;
//**************** Do query to get Range or collection from selected manufacturer ************************
$sql2 = "SELECT * FROM stockcatalog WHERE category = '$page' and Manufacturer ='$Manufacturer' and range='$range'";
$result2 = mysql_query($sql2, $conn) or die(mysql_error());
//************ loop through query result and create table ***********************add at end of field to print cell border if cell empty
$string2.="<table class=menu5 width=658 ><CAPTION align=top>".$catdesc." - ".$range." range by ".$Manufacturer."</CAPTION><tr><th>StockID</th><th>Pattern No</th><th>Description</th><th>Price</th><th>Prod code</th><th>Width/<br>Depth</th><th>Pattern Repeat</th><th>Sample</th></tr>";
while ($myrow2 = mysql_fetch_array($result2)) {
$string2.="<tr><td>".$myrow2['stockID']."</td><td> ".$myrow2['patternname']."</td><td>".$myrow2['description']."</td><td> ".$myrow2['price']."</td><td> ".$myrow2['productcode']."</td>
<td>".$myrow2['width']."<br>".$myrow2['depth']."</td><td> ".$myrow2['patternrepeat']."</td>
<td><a href='../images/{$myrow2['pix2']}' border='0'><img src='../images/{$myrow2['pix1']}' border='0'width='100' height='80'></a></td></tr>\n" ;
}
echo ($string2);} // create table of SELECTED RANGE
?>
</table>
<!--- ****************************************************************************************************
<!-- </div> -->
<?php
if (($page==Home)or ($page==""

){
$stringhome.="<div class=main2 style='position:absolute; left:120; top:0; width:658; height:500'>";
$stringhome.="This our HOME PAGE";
echo($stringhome);
}
if ($page==aboutus){
$stringhome.="<div class=main2 style='position:absolute; left:120; top:0; width:658; height:500'>";
$stringhome.="This our ABOUT US PAGE";
echo($stringhome);
}
?>
</div>
</div>
</body>
</html>