justAnoob Posted March 26, 2009 Share Posted March 26, 2009 i have several folders(categories) on my server which contain images. i have a database in mysql which contain info on those images. I'm looking to be able to click on a category on the website and then have the images from that category displayed in some sort of table format(10 per page, with a next and previous button in case there are more than 10, or 20 or 30, you get the point. Also I would like the info about the image to appear next to the images on the page. Is this difficult to make happen and look good??? Right now this is what I have and all it does is display the images vertically down the page with a <br/> inbetween the images. So far so good. Here is the code. <?php $imgPath = "userimages/Computers"; foreach(glob("$imgPath/{*.jpg,*.png,*.gif}", GLOB_BRACE) as $fname) { echo '<img src="' . $imgPath . '/' . baseName($fname) . '" width="150" border="1"><br/><br/>'; } ?> Quote Link to comment Share on other sites More sharing options...
justAnoob Posted March 26, 2009 Author Share Posted March 26, 2009 bump, ttt.... anyone got any input on where to start with something like this. Quote Link to comment Share on other sites More sharing options...
ober Posted March 26, 2009 Share Posted March 26, 2009 No one is going to write it for you... you need to take the first steps: 1) Learn how to connect to a database 2) Learn how to query the database 3) Learn basically display and navigation None of these are simple enough for someone to just throw some code at you (and that wouldn't help you anyways). You haven't told us anything about the database structure or the data in it. You've basically just asked a VERY open-ended question. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted March 26, 2009 Author Share Posted March 26, 2009 No need to get snippy there bud.... I can do all three you mentioned.. Just wondered if anyone knew of any tutorials that might help me out through the process.... Quote Link to comment Share on other sites More sharing options...
phant0m Posted March 26, 2009 Share Posted March 26, 2009 what information do you have in that table? Quote Link to comment Share on other sites More sharing options...
justAnoob Posted March 26, 2009 Author Share Posted March 26, 2009 images are in several folders on the server.....i have a table in mysql with these fields that I need to display...name, description, in-return.... maybe something like that to start....but as i mentioned before...each folder(category) may have a few pages. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted March 26, 2009 Author Share Posted March 26, 2009 the name shouldn't be that much text.... the description could be up to about 250 characters and in-return could be the same, about 250 characters... all three will be all text. Quote Link to comment 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.