I have trouble with my snippet running livehost.
It is a simple image gallery. I have thumbs that pass variables to the snippet through the address bar.
// html link example: ?id=55&pid=in10
I had it running livehost but then it stopped refreshing the images after the page was loaded. It changes the images only when I navigate to another menu id.
It works ok localhost though.
eto 0.6.1.4 Final
PHP Version 4.4.4
mysql 4.1.22
Apache/1.3.37
$id = $_GET['id']; // menu id
$pid = $_GET['pid']; //picture id
$output= "";
//debug
echo $pid;
echo "<br/>";
echo $id;
// given the menu id we assign description and image path variables as arguments
switch ($id) {
default:
case 55: {return show_img("i/b", "title 1", $pid); }break;
  case 56: {return show_img("m/b", "title 2", $pid); }break;
  case 57: {return show_img("g/b", "title 3", $pid); }break;
  case 58: {return show_img("o/b", "title 4", $pid); }break;
  case 59: {return show_img("t/b", "title 5", $pid); }break;
  case 60: {return show_img("d/b", "title 6", $pid); }break;
  case 61:
case 62:
case 63: return; break;
}
//function: insert image given the $pid variable
function show_img($imgpath, $desc, $pid)
{
$pid = $_GET['pid'];
$server_root = 'http://'.$_SERVER['SERVER_NAME'];
$ins_img = "$server_root/i/$imgpath/$pid.jpg";
//image size
$imgsize = @GetImageSize($ins_img);
$output .= "<div id=\"big\">";
$output .= "<img src=\"".$ins_img."\" ".$imgsize[3]." alt=\"".$desc."\" />";
$output .= "</div>";
return $output."";
};
Any suggestions?
Thank you in advance.
Edited by asphalt43, 21 August 2007 - 01:15 PM.


This topic is locked








