It shows that you are unregistered. Please register with us by clicking Here
![]() |
|
![]() |
![]() | Register - FAQ - Today's Posts - New Posts - Support - Search | ![]() |
![]() |
![]() |
|
LinkBack | Thread Tools | Display Modes | ![]() |
|
|
#1 (permalink) |
|
Junior Member
Join Date: Jul 2006
Age: 38
Posts: 14
|
Hopefully the title gave an ok idea of what I need. So here are the specifics.
I am building a website for a firm and they have an online portfolio that showcases key projects. Some projects have pictures associated with them. If they have pictures then if you click on the title of the project it will bring up a page displaying the first picture. I need a code that will put up prev and next links if there are more images in the database. The database is set up similar to this: ID, name, location, image01, image02, ... , image11 Now here is where I need some help. When the title of a project is clicked 'project.asp' comes up with two paramaters: ( project.asp?id=1&p=image01 ) 'id' is the unique number of the project, and 'p' is the first picture associated with that project (the URL of the first image, stored under 'image01' in database). I need a code that will check to see if 'image02' to 'image11' have data in the row. If they do, it will display a next link to the next image ( project.asp?id=1&p=image02 ) up until there is no data in the next 'image' cell. So if there are only 5 images, it only goes to p=image05. I think I've made my point, but if not, let me know. I can always add more information to make it clearer. I am not versed in ASP, but I have generally been able to understand it once I've seen it and taken a close look at it. But I don't know where to start/how to code prev/next links. Any help would be appreciated. Destiny |
|
|
|
|
|
|
|
#2 (permalink) |
|
Senior Member
Join Date: Jul 2006
Age: 30
Posts: 258
|
i'd create a function which checks if there is a "next picture". let's call it check_next( pic_id )...
since in the URL you receive the id of the picture (id=1&p=image01) you'll have to increase the image number from 01 to 02 and create a query like select image02 from table_name where id=id_value if you get back something ... you can put a next link out! this is just a start though ... ;)
__________________
-- iM |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Links Directory | Links Exchange Program | zachary | All Other SE's & Directories | 4 | 09-07-2006 12:04 AM |
| Cookie-based Authentication: Login program | Ankita | Perl | 0 | 08-19-2006 10:40 AM |
| Database Links | aaron | Programming | 0 | 07-29-2006 04:18 PM |
| Looking to buy web-based business/ technology | andrew | General Business Issues | 0 | 07-04-2006 06:56 PM |
| Nintendo based skin | Daphnes | Graphics & Multimedia | 29 | 03-27-2006 11:46 PM |