Random photos module Random photos module
 

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

Random photos module

Started by bellimar, December 01, 2005, 01:51:12 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

bellimar

Hi,
What is wrong here bacuse in other album it works. Tell me what I do wrong. This is module random pics on main site.

<?php

/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );


echo '<center>';
$ara1 = mysql_connect('localhost', '******', '*****')
   or die('Could not connect: ' . mysql_error());
mysql_select_db ('******');


$query = "SELECT * FROM `cpg135_albums` ORDER BY RAND() LIMIT 0,3";
$result = mysql_query($query);
while($r = mysql_fetch_array($result)) {


echo '<a href="http://www.galeria.arachnea.pl/displayimage.php?cat='.$r['category'].'" target="_blank"><img src="http://www.galeria.arachnea.pl/thumbnails.php?cat='.$r['pid'].'" alt="obrazek" class="bob"/></a><br/><br/>';
}

echo '</center>';
mysql_close($ara1);

?>

Joachim Müller

not sure what your question is - standalone coppermine doesn't come with "modules".