same result
heres the code, trimmed down to the basic
when i view source on the browser, im noticing the "$newid" is placed in the href when its supposed to be up on the url. not sure if that makes sense
PHP Code:
<?php
include("dbconnect.php");
$prod = $_GET['prod'];
//$view = $_GET['view'];
if ($view==null){$view='A';};
$query0 = "SELECT * FROM products WHERE productID='$prod'";
$result0 = mysql_query($query0) or die (mysql_error());
$row0 = mysql_fetch_array($result0);
$item = $row0['itemName'];
$newid = $row0['id'];
$fabricName = $row0['fabricName'];
$str3 = ($row0['productID']);
$str6 = ($row0['productID']);
$three = substr($prod, 0, 3);
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/koza_main.css" rel="stylesheet" type="text/css" />
<link href="css/koza_product.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<?php
if ($three == "RET") {
echo "<div id='productImgRetreat'><img src='assets/main_img/";
} else {
echo "<div id='productImg'><img src='assets/main_img/";
}
echo $view."_";
echo $row0['productID'];
echo ".jpg'/></div>";
?>
<div id="productDescriptDiv">
<?php
echo $newid;// <<<<<<<<<<<<<for testing, this number works
$last = substr($str3, -2);
echo "\n<div id='colorwayDiv'>\n<ul>\n";
echo"<li><a href='product.php?id=$newid&prod=";//<<<<< need to press this 2x to get the href / url to switch
echo substr($str6, 0, 6)."_dc";
echo"'><img src='img/swatch/A_retreat.jpg' width='30' height='30' /></a></li>\n";
echo"<li><a href='product.php?id=$newid&prod=";//<<<<< need to press this 2x to get the href / url to switch
echo substr($str6, 0, 6)."_do";
echo"'><img src='img/swatch/B_retreat.jpg' width='30' height='30' /></a></li>\n";
echo"<li><a href='product.php?id=$newid&prod=";//<<<<< need to press this 2x to get the href / url to switch
echo substr($str6, 0, 6)."_pc";
echo"'><img src='img/swatch/C_retreat.jpg' width='30' height='30' /></a></li>\n";
echo"<li><a href='product.php?id=$newid&prod=";//<<<<< need to press this 2x to get the href / url to switch
echo substr($str6, 0, 6)."_po";
echo"'><img src='img/swatch/D_retreat.jpg' width='30' height='30' /></a></li>\n";
echo "</ul>\n</div>\n";
?>
</div>
</div>
</body>
</html>
Bookmarks