quickie for ya...
got a template page, on requested link from another page, it sends variable to the template page to create content that is pulled from a db. my query is pulling the right data, but I can't get the image to show, not sure if it is my usage of the variable in the img tag???
<?php
include("../php/includes/db.inc");
if (isset($GET['page_name'])) {
$page_name=$GET['page_name'];
$sql=@("SELECT img_1,img_2,img_3 FROM pages WHERE page_name = '$page_name'");
$a_row=mysql_fetch_array($sql);
$img_1= $a_row["img_1"];
$img_2= $a_row["img_2"];
$img_3= $a_row["img_3"];
//echo "$page_name,$img_1,$img_2,$img_3";
}
?>
<table border="0" cellspacing="0" cellpadding="0" width="518" height="50">
<tr>
<td align="right" valign="top" height="1"><img border="0" src="$img_1" width="213" height="122">
</td>
<td width="299" rowspan="2" height="50"><img border="0" src="$img_2" width="285" height="348">
</td>
</tr>
<tr>
<td align="right" valign="top"><img border="0" src="$img_3" width="213" height="226">
</td>
</tr>
</table>
the link from the sending page just looks like this:
<a href="../productline/template.php?page_name=od_about"....>
and I stored the path to the images in the db not the image itself so it is stored as such (minus the whatever):
img_1=../odyssey/images/whatever.gif
img_2=../odyssey/images/whatever.gif
img_3=../odyssey/images/whatever.gif
the paths are correct, so I am stumped...any ideas?