Jump to content

[SOLVED] how difficult to make this work???


justAnoob

Recommended Posts

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/>'; 
				  }
?>

Link to comment
https://forums.phpfreaks.com/topic/151177-solved-how-difficult-to-make-this-work/
Share on other sites

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.