FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


run into pictures





bykezzap
<?
$lower = 1; // başlangıç numarası
$upper = 11; // bitiş numarası, toplam resim sayısı
$random_number = mt_rand($lower, $upper); // rasgele numara seç
$image = "$random_number.jpg"; // dosya adına dönüşüm

echo "<img src='images/$image' alt='$image' border='0'">
?>

run into picture for you....
neekhu
Yep, this should get you an image, located in the current folder in folder images.

But, I'd like to make some little modifications, better put it like this way:

echo "<img src=\"./images/".$image."\" alt=\"".$image."\" border=\"0\">";

Hehe Razz.

@bykezzap: Can you also give us a code to display an image located in a database?
Related topics
Why use IE?
Super to chase after the girls the past master (exceed makin
How To : Improve Your PHP Programming
How To : Secure Your PHP Website
Inverting / Backwards Web Page ???
The Average Age Here?
Duplicating A Color Scheme
Programming Help & Support Guidelines
Church against Marilyn Manson
Why You Should Never Use Flash
Is it possible, can you build your own laptop from scratch ?
Chang'e accepts the plastic surgery ……
Questions about the Mind and Existence of the Soul
Hammy's Interesting Thread of Interesting!
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.