a simple code for using the latest images on an HTML page... a simple code for using the latest images on an HTML page...
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

a simple code for using the latest images on an HTML page...

Started by alexpalermoo, December 17, 2007, 05:16:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alexpalermoo

Hey!
I have been looking everywhere for a code like "http://www.breatheheavy.com"...they have the latest pictures from thier coppermine gallery automatically updated on their non-coppermine gallery page (the index page of the site)...and i need help trying to find the code! thanks!

alexpalermoo


François Keller

Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller


just_some_guy

#4

<?php

// MYSQL connect info here 
// Alter `cpg1411` to the table prefix you use
$sql 'SELECT filename,filepath FROM `cpg1411_pictures` ORDER BY ctime DESC LIMIT 10;'
// Alter the number after LIMIT to define the number of pictures you want
$result mysql_query($sql);

while (
$row mysql_fetch_assoc($result)) {
echo 
'<img src="';  
echo 
$row['filepath'];
echo 
$row['filename'];
echo 
'"  />';
}

?>



That will start you off, you may need to alter the code etc. I know this is'nt support for coppermine, but i had a few free minutes.

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

alexpalermoo


alexpalermoo