Jump to content

Dreamweaver Image Gallery Help


Jarel101

Recommended Posts

Hi, I'm trying to create a web gallery something exactly like this: http:

 

I'm about 70% done with this project, So far I have 4 fields in my DB table (ID,Image,Description,keywords). I have images in sets of 3 being displayed vertically on a webpage in descending order with pagination at the bottom as seen in the example.

 

Here's my problem: I want to be able to click on an image and view that same image on another page, without creating a new page for every single image(as seen in the example).

 

I here this is done by passing id parameters. To complete my project I've been following this video:

 

I've completed everything in this video up until the 2:30 mark. At this point the instructor uses a visual query builder to complete his web gallery. At this point I get kinda confused, Do I absolutely need a visual query builder? Are there other simpler ways of completing my project that I don't know about? I want to know all I can before I purchase this qb: http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=2426522

 

For this project I'm using Dreamweaver Cs5, I'm not really an experienced coder I rely heavily on dreamweaver for my code, I just make minor tweaks. So if anyone has an answer to my problem please break down and simplify your answer I'm still a beginner. Thanks in advance.

 

ps

 

If anyone knows of any other video tutorials of this process please inform me, it would be greatly appreciated, thank you.

Link to comment
Share on other sites

No, you dont need the visual query builder. I imagine it makes some things easier, but for basic stuff like this, it really isn't necessary.

 

I do have some online code that demonstrates something similar -- in this case, creating/editing/deleting records from a database. http://www.killersites.com/community/index.php?/topic/3064-basic-php-system-view-edit-add-delete-records-with-mysqli/ The code itself is free, and I have a couple screencasts that use this code that are available to subscribers of the Killer Video Library (http://www.killersites.com/university -- check under PHP > PHP CRUD Videos.)

 

In your case, here are the basic steps you'd need to follow:

 

-- 1: The first step would be to create some sort of index page that lists the images. It sounds like you have done that.

-- 2: The second step would be to add links to each thumbnail image, linking to a new page with the id in the URL. For example: your_page.php?id=1.

-- 3: If the user clicks to view the page, you would use $_GET[] to get the value of the id from the URL. After ensuring that it is a valid number, you would check in the database the record associated with that id.

-- 4: If the record isn't found, you would need to display an error message. If it is found, you would need to grab any data you needed from that row and store it in temporary variables

-- 5: Then display those temporary variables to the page using echo. In the case of the image (which I am assuming is the URL to the image, not an actual image?), you'd need to do something like this:

 

<img src="<?php echo $temp_variable; ?>" alt="" />

 

to display the image within the page.

Link to comment
Share on other sites

No, you dont need the visual query builder. I imagine it makes some things easier, but for basic stuff like this, it really isn't necessary.

 

I do have some online code that demonstrates something similar -- in this case, creating/editing/deleting records from a database. http://www.killersites.com/community/index.php?/topic/3064-basic-php-system-view-edit-add-delete-records-with-mysqli/ The code itself is free, and I have a couple screencasts that use this code that are available to subscribers of the Killer Video Library (http://www.killersites.com/university -- check under PHP > PHP CRUD Videos.)

 

In your case, here are the basic steps you'd need to follow:

 

-- 1: The first step would be to create some sort of index page that lists the images. It sounds like you have done that.

-- 2: The second step would be to add links to each thumbnail image, linking to a new page with the id in the URL. For example: your_page.php?id=1.

-- 3: If the user clicks to view the page, you would use $_GET[] to get the value of the id from the URL. After ensuring that it is a valid number, you would check in the database the record associated with that id.

-- 4: If the record isn't found, you would need to display an error message. If it is found, you would need to grab any data you needed from that row and store it in temporary variables

-- 5: Then display those temporary variables to the page using echo. In the case of the image (which I am assuming is the URL to the image, not an actual image?), you'd need to do something like this:

 

<img src="<?php echo $temp_variable; ?>" alt="" />

 

to display the image within the page.

 

Thanks allot, my problem is now resolved. You really made me realize how simple this was, I think I just over thought this. Again thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...