boyntonstu Posted December 17, 2010 Share Posted December 17, 2010 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"; ?> Quote Link to comment Share on other sites More sharing options...
litebearer Posted December 17, 2010 Share Posted December 17, 2010 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) Quote Link to comment Share on other sites More sharing options...
boyntonstu Posted December 17, 2010 Author Share Posted December 17, 2010 Thanks for looking. I will attempt doing what you advised. Stu Quote Link to comment Share on other sites More sharing options...
boyntonstu Posted December 17, 2010 Author Share Posted December 17, 2010 litebearer, IT WORKED! Many thanks. Quote Link to comment Share on other sites More sharing options...
Rifts Posted December 17, 2010 Share Posted December 17, 2010 have you looked at your contact page? its pretty messed up Quote Link to comment Share on other sites More sharing options...
boyntonstu Posted December 18, 2010 Author Share Posted December 18, 2010 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.