partners
|
trim($Product);
trim($ProductName);
trim($ID);
if (!$Product)
{
echo "You have not chosen a product, please return to the Products page.";
}
else
{
if(!$ID)
{
echo " Products > ".$ProductName." ";
$db = mysql_pconnect("sql5c9b.megasqlservers.com", "unitecincc469884", "Montreal1");
if(!$db)
{
echo "Error: Could not connect to the database...";
}
mysql_select_db("unitec_unitecinc_com", $db);
$query = "SELECT * from ".$Product;
$result = mysql_query($query, $db);
//printf("Name: %s \n", mysql_result($result,0,"Name"));
$num_results = mysql_num_rows($result);
echo "";
for ($i=0; $i < $num_results; $i++)
{
$row = mysql_fetch_array($result);
echo " ".$row['Name']." ";
}
echo "
";
}
else
{
$db = mysql_pconnect("sql5c9b.megasqlservers.com", "unitecincc469884", "Montreal1");
if(!$db)
{
echo "Error: Could not connect to the database...";
}
mysql_select_db("unitec_unitecinc_com", $db);
$query = "SELECT * from ".$Product." where ProductID like '%".$ID."%'";
$result = mysql_query($query, $db);
$row = mysql_fetch_array($result);
echo " Products > ".$ProductName." > ".$row['Name']." ";
echo "".$row['Name']." ";
printf("", $row['Picture']);
echo "".$row['Description']."
";
}
}
?>
|