Gregg Posted September 11, 2006 Share Posted September 11, 2006 Ok, i am trying to make it so if a user isent logged in the image will show thecensored version.I have 2 foldes for the photos, "One unedited" & "One Censored" but i keeps loading "THE IMAGE CODE" and errors?[code]<?if($UsErCoOkIe) include("Users3Rate/Gerard.gif"); else include("Users3Censored/Gerard.gif");?>[/code]Theni heard you cant use that function on images? Anyone got and an ideah how to fix this or why it keeps loading the image code and not the image! Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 11, 2006 Share Posted September 11, 2006 .gif files are not capable of interpretation by the php engine, so:[code]if ($UsErCoOkIe) { $img_src= "whatever.gif..."; // presumably a function of the user name} else { $img_src= "whatever_else.gif ...";//presumably a function of the user name}echo "<img src='". $img_src. "'>";[/code] Quote Link to comment Share on other sites More sharing options...
Gregg Posted September 11, 2006 Author Share Posted September 11, 2006 You did it kid... Worked like a charm![quote]That's right... who's laughing now... who's laughing *now*?[/quote] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.