
Forum » » Pour débuter » » affichage aléatoire d'images (PHP)
Posté : 15-01-2008 17:05 
!PHP!<!--meta
<?php
global $cookie;
$username = $cookie[1];
if ($username == "") {
echo translate( ont>"Create</a> an account")."\n";
} else {
echo translate( ont>"Welcome")." : <a href=user.php class=header>$username</a>";
}
?>
meta-->
<?
$cpt=10;
srand((double)microtime()*1000000);
$nbr=rand(0,($cpt-1));
print ("<img
src='/photos_accueil/photo$nbr.jpg' alt=''></a>");v
?>
!PHP!meta
");v
?>
meta-->
Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=23210&forum=10