Thadeus Posted October 13, 2010 Share Posted October 13, 2010 Hello, I am trying to make a picture gallery for my website but i am having a problem with the size of the pictures. When i go to the picture gallery i want to see the pictures that i have stored in the pictures file, in a small scale and not in full resolution. My problem is that i have managed to create this picture gallery but i have failed in seeing the pictures in a small scale. So when i go to the picture gallery i see all of my pictures in full resolution. Imagine how that is. The code i use is: <?php $pics= ("pics/"); $cols= 4; if ($handle = opendir($pics)) { while (FALSE !== ($file= readdir($handle))) { if ($file != "." && $file != ".." && $file != rtrim($pics, "/")) { $files[]=$file; } } closedir($handle); } $colsCtr= 0; echo '<table width="100%" cellspacing="10"><tr>'; foreach($files as $file) { if ($colsCtr%$cols == 0) echo '</tr><tr><td colspan="2"><hr /></td></tr><tr>'; echo '<td align="center"><a href="' . $pics . $file . '"><img src="' . $pics . $file . '" /></a></td>'; $colsCtr++; } echo '</table>' . "\r\n"; ?> Can some one please tell me what is wrong with the code? Can you please tell me what to add or what to remove so that this works? Please not that i want to see the pictures at small scale first and when i click on each picture see the full resolution. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/ Share on other sites More sharing options...
premiso Posted October 13, 2010 Share Posted October 13, 2010 Hi! Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121791 Share on other sites More sharing options...
Maq Posted October 13, 2010 Share Posted October 13, 2010 Hi. Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121792 Share on other sites More sharing options...
Philip Posted October 13, 2010 Share Posted October 13, 2010 Hey there! Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121793 Share on other sites More sharing options...
Zane Posted October 13, 2010 Share Posted October 13, 2010 What's happnin' Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121794 Share on other sites More sharing options...
KevinM1 Posted October 13, 2010 Share Posted October 13, 2010 What up, dawg? Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121795 Share on other sites More sharing options...
Thadeus Posted October 13, 2010 Author Share Posted October 13, 2010 hahahaha yes i missclicked before.. Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121797 Share on other sites More sharing options...
Maq Posted October 13, 2010 Share Posted October 13, 2010 hahahahahahahahahahahahaha Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121804 Share on other sites More sharing options...
Thadeus Posted October 13, 2010 Author Share Posted October 13, 2010 so any solutions?? Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121807 Share on other sites More sharing options...
Thadeus Posted October 13, 2010 Author Share Posted October 13, 2010 nvrmind ive fixed it. Quote Link to comment https://forums.phpfreaks.com/topic/215786-pic-gallery-issues/#findComment-1121815 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.