note 27949 deleted from control-structures.else by vincent
| From: | vincent@php.net | Date: | Fri, 29 Aug 2003 14:16:57 +0000 |
| Subject: | note 27949 deleted from control-structures.else by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55306@lists.php.net to get a copy of this message | ||
Note Submitter: spork@keenintelect.com
----
Here is a sample code that checks for a user image. If its not there it displays the defined
"not found" image.
<?
if (file_exists("./user_images/" . $_GET['user_small'] . ".jpg"))
{ ?>
<a href='./index.php?p=user_image&id=<? echo $user_small ?>.jpg'><img
src='./user_images/<? echo $user_small ?>_small.jpg'
border='2'></a>
<?
} else {
?>
<img src="./user_images/notfound.jpg" border="2">
<?
}
?>
Code in action here.
http://www.keenintelect.com/~bebop/index.php?p=users