I'm Back! And so are you, it looks like?
First of all, static html???? Say it aint so!
#1
You may want to get in the habit of throwing in something like this for debugging, so there are no surprises and 6 day head scratching:
print "DEBUG: optn15 = ".$_POST["optn15"]."<BR>";
-- or --
print "DEBUG: background = ".$background ."<BR>";
-- Your problem will be very obvious. You are assigning the # 415, for example to the background var. Thats great for the DB but it isnt a URL, now is it? You are assuming that is the issue, but poutting in a temp thing like that would make it plain as day, and you could move on.
You need to have a hidden var to hold the URL also when you make the selection. We had a few stacked JS commands in the past to do this.
Personally, rather than a confusing mess like that, I would rename 3bamboo.jpg to 415.jpg
Then you could just do this:
#2 you will need to go back and learn about PHP arrays and loops.Code:<td align="center" valign="middle"><table width="350" height="200" border="0" align="center" cellpadding="0" cellspacing="0" background="http://www.rlhanson-online.com/designer/images/pics/backgrounds/thumbnails/<?php echo $background;?>.jpg">
Not seeing where this is done, I can say, review the sections on arrays.
$pointconvert=array('8pt'->'421','10pt'->'422', .... etc);
This sets up an associative array with points as the 'key' and DBcodes as the 'Value' so you can defibe it once and use it as a 'lookup'
Each DB value of the array is 'associated' with a point size.
.. Or, do it (ughhh!) the sloppy comprehensible way:Code:<input hidden name=SIZEcompanyNameConverted value="<?$pointconvert[$_POST['SIZEcompanyName']]?>">
<input hidden name=SIZEaddressConverted value="<?$pointconvert[$_POST['SIZEaddress']]?>">
#3 You lost me? Hidden vars are how you 'collect' info and pass it to the next page. But you know that already? So is there something I missed?Code:<input hidden name=SIZEcompanyNameConverted value="
<?
if ($_POST['SIZEcompanyName']=='8pt'){
echo '421';
} elseif($_POST['SIZEcompanyName']=='10pt'){
echo '422';
} elseif(...) {
echo '...';
}
?>">
Hope that helps.