Grow your CSS skills. Land your dream job.

Need a Point in the Right Direction.

  • # September 9, 2009 at 3:45 pm

    I just got finished putting together the photo gallery "#64: Building a Photo Gallery" from this site and everything works fine. Now I’m trying to incorporate it into my design but I have no idea where to start. I’m a novice with css but I understand it and I’m trying to learn php via online tutorials.

    I’m wondering if I just need to copy and paste part of the php file into my html document inside of a div tag. I tried pasting all the php but that didn’t work. Is their a better way of doing this or a certain part of the php document I need to paste in?

    Here is the test gallery.
    http://www.shepardsuperteam.com/chris/index.php

    Here is where I need it.
    http://shepardsuperteam.com/chris/gallery.html

    And this was the tutorial of the gallery.
    http://css-tricks.com/video-screencasts … o-gallery/

    Any help would be gratefully appreciated.
    Thanks!

    # September 16, 2009 at 9:57 pm

    I would personally make a mysql database with the following fields: name, description, thumbnail_url, and fullsize_url; and then use something like like this to display the photos:

    Code:
    $conn = mysql_connect(‘localhost, ‘username’, ‘password’) or die (‘Error’);
    mysql_select_db(‘name’);

    $sql = “SELECT * FROM dbname”;
    $result = mysql_query($sql);

    echo ‘

    ‘;

    while($row = mysql_fetch_assoc($result)){

    $name=$row[‘name’];
    $src=$row[‘thumbnail_url’];
    $src_full=$row[‘fullsize_url’];

    echo ‘

    ‘;}

    ‘.$name.’
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".