Im new to php so maybe this is so simple you could point me in a direction a little closer What im trying to do is something like this maybe in my profile.php file //site thumbnail check//////////// $filename = "sitethumbs/".$user['login'].".jpg"; if (file_exists($filename)) { } else { $t->assign('sitethumbs', $filename); } /////end//////////// then I have a file called viewprofile.html which uses the profile.php with smarty templates so in this file I use {if ($sitethumbs)} <img src="members/sitethumbs/thumbs/{$user.login}.jpg" border="0" width="145" alt="Visit {$user.login}'s website"> {/if} Basicly in the template file it is always showing ($sitethumbs) and I want it to only show ($sitethumbs) if the file exist
Hi Jason, I'm no php guru myself but thought perhaps this might help: Code: //site thumbnail check//////////// $filename = "sitethumbs/".$user['login'].".jpg"; if (!file_exists($filename)) { $t->assign('sitethumbs', $filename); } /////end//////////// It shortens your code (a good thing) by changing the conditional check to just a not (by putting an exclamation before the file_exists command). Try that and see if it helps... if it does, great as this would be the first time I've ever helped someone else other than myself when it comes to this stuff Cheers, ~Regs.