I am trying to create a page where a few images are displayed along with a link to view a larger version of that same picture. The database containing information about the image (ie the directory path) is queried and other information such as an identifier (called posid) is also returned. The problem is that when I click on the link that accompanies the image, 'posid' is not recognized by the preceeding page and therefore nothing is displayed.
Here is the function that displays the thumbnail of the image along with a few details:
function display_img($img_array)
{
if(!is_array($img_array))
return false;
foreach($img_array as $row)
{
echo '<img src="'.$row['imgsrc'].'" height="10%" width="10%">'
.'<a href="jview/showjob.php?job='.$row['jobname'].'?posid='.$row['posid'].'" target="_blank">'.$row['jobname'].'</a><br /><br />';
}
}
Here is the function on the preceeding page that gets more information from the database on the selected image:
function get_lg_img_details($posid)
{
if(!$posid)
return false;
db_connect();
$result = mysql_query("SELECT * FROM imagetest WHERE posid = '$posid'");
if(!$result)
return false;
if(!mysql_num_rows($result))
return false;
$result = db_result_to_array($result);
return $result;
}
And, here is the function on that same page which displays the large image along with some information:
function display_lg_img($picdis_array)
{
if(!is_array($picdis_array))
{
return false;
}
else
{
foreach($picdis_array as $row)
{
echo '<img src="../'.$row['imgsrc'].'">'
.'<br /><p class="stext"><b>'.$row['jobname'].'</b></p>'
.'<br /><p class="stext">'.$row['imgdescrib'].'</p>';
}
}
}