Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Need a Point in the Right Direction.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26046

    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.
    https://css-tricks.com/video-screencasts … o-gallery/

    Any help would be gratefully appreciated.
    Thanks!

    #64245
    bmdsherman
    Member

    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)
  • The forum ‘Back End’ is closed to new topics and replies.