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
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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.