Jump to content

Nubee With code problem. Help would be appreciated.


boyntonstu

Recommended Posts

I am 72 and just learning HTML and PHP.

 

I was forced to take over control of my wife's website:  www.janlieberman.com

 

There is a photo gallery with thumbnails that expand to full size when you click them.

 

These photos are linked to a php file and I cannot get it to function.

 

I found a way to make the thumbnails work using direct html but that created another problem.

 

There is a slide show that runs too slow using the html rather than the php code.

 

This is the code that needs examining:

 

<?php

 

// id is defined in the other files

 

include "photos_db.php";

 

if ($Photos[$id]['title'] == '') {

$PageTitle = "Jan Lieberman - Photo";

} else {

$PageTitle = $Photos[$id]['title'] . " - Jan Lieberman Photo";

}

 

$FileName = $Photos[$id]['filename'];

 

include "header.php";

 

echo <<< EOF

 

<h1>Jan Lieberman - <font size="3"><a href="photos.html">Photo Gallery</a></font></h1>

 

<table class="list">

<tr><td align="center">

EOF;

 

if ($id != 1) {

echo '<a href="photo_' . $Photos[$id-1]['filename'] . '.html">< Previous</a>';

}

echo "    ";

if ($id != sizeof($Photos)) {

echo '<a href="photo_' . $Photos[$id+1]['filename'] . '.html">Next ></a>';

}

echo '</td></tr>';

echo '<tr><td align="center"><img src="/images/' . $FileName . '.jpg" border="0" alt="' . $PageTitle . '">';

 

if ($Photos[$id]['title'] != '') {

echo "<br>" . $Photos[$id]['title'];

}

 

echo '</td></tr>' . "\n";

echo "</table><br>\n";

 

include "footer.php";

 

?>

Link to comment
Share on other sites

I took a quick look at the site. A key thing I noticed was that your files are HTML yet you 'call' php scripting in those files.

 

UNLESS you have setup your site where it KNOWS to treat html as php, you need to rename the files with a .php extension.

 

(note:  make sure to make those changes to your menu)

Link to comment
Share on other sites

Hi,

 

 

I have not addressed the contact page.

 

The thumbnails needed to point to a PHP instead of an HTML,

 

There was a PHB data base for the 24 photos.

 

This is all brand new to me.

 

May I send you the contact page code?

 

Have you seen my inventions?

 

Thanks,

 

Stu Lieberman

 

 

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.