But i'm embarrassed. :eek: So n00b....
Well... here is the links on side of gallery page
<td align="left" valign="top"><font size="5"><b>Products</b></font><br />
<a href="<?php echo $PHP_SELF; ?>?display=fishwaffle> Fish Waffles</a><br />
<a href="<?php echo $PHP_SELF; ?>?display=flaxwhacker> Flax Whackers</a><br />
... and this is the display of items, with category in table header.
$result = @mysql_query(
"SELECT * FROM things WHERE cat = '$display'");
if (!$result) {
echo("<p>Error performing query: " .
mysql_error() . "</p>");
exit();
}
// List Items
if (isset($display)){
echo("<table cellpadding=\"3\" border=\"1\">");
echo("<tr>");
// here is where $display should = "Flax Whacker" if it actually
// is "flaxwhacker." I had it working, and then i broke it, which is
// yet another good reason to do something differently.
echo("<td colspan=6 align=\"center\"><b>$display</b></td>\n");
echo("</tr>");
echo("<tr>");
echo("<td><B>SKU#</B></td>\n");
echo("<td><B>Description</B></td>\n");
echo("<td><B>Click for<br />Pic</B></td>\n");
echo("<td><B>Price </B></td>\n");
echo("<td><B>In <br />Stock?</B></td>\n");
echo("<td align=\"center\"><B>Buy It!</B></td>\n");
echo("</tr>");
echo("<tr>");
while ( $row = mysql_fetch_array($result) ) {
$description = $row["descr"];
$stock = $row["stock"];
$sku = $row["sku"];
$price = $row["price"];
$img = $row["img"];
$tn = $row["img_tn"];
if($stock=1){
$stock="Yes";
}
else($stock="No");
echo("<td> $sku</td>\n");
echo("<td> $description </td>\n");
echo("<td><a href=\"$img\" target=\"_blank\"><img align=\"left\"
src=$tn><small>More<br />info</small></a></td>\n");
echo("<td> \$$price </td>\n");
echo("<td>$stock</td>\n");
echo("<td align=\"center\"><img src=\"./images/buy.gif\"></td>\n");
echo("</tr>");
}
I didnt need to paste all that. did i?
Anyway, in the admin form, when the client enters an item in the category "Slap Diddles," it's entered in the db as a "slapdiddle" and $slapdiddle is the variable i use for navigation and category displays.
I can't, IOW, allow the client to make a new category called "Foo Flingers" because that's not an acceptable format for either variables or URLs. But if i don't, then everywhere i want to display the string "Foo Flingers," i have to specifically declare that's what the variable $fooflingers means.
Speak i good yet? Fuddled be me.