[u][b]Thank you for your response, however I think I require another solution.
I have the following code:
[/b][/u]
<?php
session_start();
$group = "";
include("connection/connection.php");
if(isset($_REQUEST["group "])) $group = $_REQUEST["group "];
$sql = "SELECT * FROM `products` WHERE `group ` LIKE '" . $group . "' AND `new_status` LIKE 'show' LIMIT 0 , 150";
$result = mysql_query($sql) or die(mysql_error("Search of property failed"));
$num = mysql_numrows($result);
if($num == 0)
{
header("Location: products.php?message=Not_Found");
echo "SORRY Listing with Ref " . $ref . " could not be found";
exit();
}
$i = 0;
$id = mysql_result($result, $i, "id");
$code = mysql_result($result, $i, "code");
$group = mysql_result($result, $i, "group ");
$product_title = mysql_result($result, $i, "product_title");
$product_image = mysql_result($result, $i, "product_image");
$product_supplier = mysql_result($result, $i, "product_supplier");
switch ($group )
{
case "Active Wear":
$outerframe = "2300";
break;
case "Tracksuit":
$outerframe = "2300";
break;
case "T Shirts":
$outerframe = "2950";
break;
case "Sweater":
$outerframe = "2300";
break;
case "Lounge Shirt":
$outerframe = "12100";
break;
case "Jacket":
$outerframe = "4700";
break;
case "Headwear":
$outerframe = "2900";
break;
case "Workwear":
$outerframe = "3350";
break;
case "Kiddies Collection":
$outerframe = "2300";
break;
case "Jersey":
$outerframe = "2300";
break;
case "Golf Shirt":
$outerframe = "10600";
break;
case "Fleece":
$outerframe = "2300";
break;
case "Corporate Wear":
$outerframe = "2300";
break;
case "Trousers":
$outerframe = "2300";
break;
case "Bags":
$outerframe = "13900";
break;
case "Ladies Gifts":
$outerframe = "2300";
break;
case "Hampers":
$outerframe = "7500";
break;
case "Carrol Boyes":
$outerframe = "3000";
break;
case "Writing Instruments":
$outerframe = "12100";
break;
case "Tools":
$outerframe = "4300";
break;
case "Office Accessories":
$outerframe = "9600";
break;
case "Novelties":
$outerframe = "8200";
break;
case "Leisure and Outdoor":
$outerframe = "13900";
break;
case "Folders and Notebooks":
$outerframe = "6450";
break;
case "Drinkware":
$outerframe = "5050";
break;
case "Out of Africa":
$outerframe = "3000";
break;
case "BRT":
$outerframe = "2300";
break;
case "Acelli":
$outerframe = "2300";
break;
}
$backgroundCentreHeight = $outerframe - 444;
?>
Which works fine.
I’m now being forced to switch to a RSS Feed as the client wishes to display multiple suppliers on his website.
$html = “”;
$url = “http://www.kevro.co.za/rss/products.aspx?email=xxxx&password=xxxx&feed=product”;
$xml = simplexml_load_file($url);
for($i = 0; $i < 5; $i++) {
$id = $xml->product[$i]->id;
$categorygroup = $xml->product[$i]->categorygroup;
$category = $xml->product[$i]->category;
$group = $xml->product[$i]->group;
$name = $xml->product[$i]->name;
$code = $xml->product[$i]->code;
$description = $xml->product[$i]->description;
$thumb = $xml->product[$i]->thumb;
$html .= "<div>$id - $categorygroup - $category - $group - $name - $code<br /><br />$description<br /><br />$thumb</div>
<hr /><br /><br />";
}
echo $html;
So I’m trying extract values in the “$group” that are the same as whatever the value is in the $group = $_REQUEST["group "];