Guys,
i turned globals off, but now my image gallery script wont run, i just am not quite sure how to fix it
<?
$album = "hiya"; //title of your gallery //
$columns = 5; //number of photos a row //
$thumb_dir = "tn"; //thumbnails location dir //
$scriptname = "index.php"; //name of this file //
//----------------------------------------------------------------------//
echo "<CENTER>\n\n";
$mydirectory= '.';
$counter=0;
$nbfiles = 0;
$currfile = "";
$fichier[0] = "";
$handle=opendir($mydirectory);
if ($home == "")
{echo "<FONT SIZE=5><B>$album</B></FONT><P>\nClick to enlarge a photo\n<TABLE BORDER='2' BGCOLOR='#dedebb' BORDERCOLORLIGHT='#000000' BORDERCOLORDARK='#000000' CELLPADDING='1' CELLSPACING='5'><TR>\n";}
while ($currfile = readdir($handle))
{$extension= strtolower(substr( strrchr( $currfile, "."),1));
if ($extension== "jpg" || $extension== "jpeg")
{$nbfiles++;
$currfile = trim($currfile);
$fichier[$nbfiles] = $currfile;
if ($home == "")
{$currthumbfile = $thumb_dir . "/" . $currfile;
echo " <TD ALIGN='CENTER' VALIGN='MIDDLE' WIDTH='50' HEIGHT='50'><A HREF=index.php?home=1&name=$currfile&nr=$nbfiles><IMG BORDER='0' SRC= $currthumbfile></A></TD>\n";
$counter++;
if ($counter == $columns)
{$counter= 0;echo"</TR>\n";echo"<TR>\n";}}}}
if ($home == "")
{echo"</TR></table>\n\n";}
closedir($handle);
if ($home == 1)
{if ($nr != 1)
{$prevnumber = $nr - 1;
echo "<A HREF=index.php?home=1&name=$fichier[$prevnumber]&nr=$prevnumber>Prev</A> ||\n";}
echo "<A HREF=$scriptname>Index</A> ||\n";
if ($nr != $nbfiles)
{$nextnumber = $nr + 1;
echo "<A HREF=index.php?home=1&name=$fichier[$nextnumber]&nr=$nextnumber>Next</A> \n";}
echo "<TABLE BORDER='2' BGCOLOR='#dedebb' BORDERCOLORLIGHT='#000000' BORDERCOLORDARK='#000000' CELLPADDING='1' CELLSPACING='5'>\n";
echo "<TR><TD><IMG ALT=$nr BORDER='0' SRC=$name></TD></TR></TABLE>\n";}
echo "<font size='2'><br><strong>© Pics are property of THIS SITE ONLY, no unauthorized use of these photos are allowed! </strong></font>";
?>
i know you know how to prefix your variables like HTTP_POST, etc..
if i knew i wouldnt be asking:rolleyes: 😃
TIA,
TGixer