Soldato
- Joined
- 31 Oct 2005
- Posts
- 8,845
- Location
- Leeds
Hello there again, I've left you alone for a while and only have a quick question this time
I currently have a piece of code that finds the number of a user, and kicks out their picture from file, only problem is, if there isn't a picture, it displays an error message.
Put simply, I'm after something like, "if $file <0 then display somefile.jpg"
Should be a 5 second job for some on you, would be much apperciated
Here's the PHP
I currently have a piece of code that finds the number of a user, and kicks out their picture from file, only problem is, if there isn't a picture, it displays an error message.
Put simply, I'm after something like, "if $file <0 then display somefile.jpg"
Should be a 5 second job for some on you, would be much apperciated
Here's the PHP
PHP:
<?php
foreach (glob("$d_no.*") as $file) {
echo '<td>' . "<a href='$file' target=_blank><img src='$file' alt='$file' width='180' height='300'></a>" . '</td>';
}
echo '</table>';
?>