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.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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