Hey,
Someone made me a script but i cannot work out how to pull out the variables.
i need to just be able to get the image name... however i get the folder locations too
this is the script
PHP Code:<?php
$dir = $_GET['login'];
$NBFile=0;
$dir ="../clients/$dir";
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
//if (substr($file, strlen($file)-3, 3)=="jpg" ) {
$FileArray[] = $dir."/".$file;
$NBFile=$NBFile+1;
//}
}
}
}
closedir($handle);
?>PHP Code:<?php
$NBPicswidth=1;
$NBPics=0;
for ($i=0; $i<$NBFile; $i++) {
$Pic_Name1=$FileArray[$i];
?><td>
<a href="showimage.php?image=<?php echo $Pic_Name1; ?>" target="order"><img src="<?php echo $Pic_Name1; ?>" width="105" border="1" align="middle"></a>
<hr width="90%" /></td><?php
$NBPics=$NBPics+1;
if ( $NBPics==$NBPicswidth ) { $NBPics=0; ?>



Reply With Quote



Bookmarks