b-a-d-b-o-i Posted March 4, 2007 Share Posted March 4, 2007 Hi, i'm not sure if i got this right... But i get no error's but when you are put in hosp/jail the banner's still don't show.. Here's the code i created! if (!$ir['jail'] > 0) { print " "; } else { print " "; } { if ($ir['hospital'] > 0) { print " "; } { else { print " "; } { print ""; Can anyone see what i'm missing here? Iv'e placed this in the header.php no errors or nowt :P Just want it to show!! Quote Link to comment Share on other sites More sharing options...
Patrick Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp it should be that : if ($ir['jail'] > 0) { print "<img src=THUGJAIL.jpg /> "; } if ($ir['hospital'] > 0) { print "<img src=THUGHOSP.jpg /> "; } else { print "<img src=Banner.gif /> "; } print "</td><td>"; Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp hey, i was close for someone starting out lol!! The thing is now... I have no error's but i got to jail/hosp and i see no banner's lol hmm..? I even tried it like this.... if ($ir['jail'] > 0) { print " "; } if ($ir['hospital'] > 0) { print " "; } else { print " "; } print "</td><td>"; Still no joy :( Quote Link to comment Share on other sites More sharing options...
Patrick Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp check if you banner are .jpg or .JPG then change the code to what they are or check is the names are right and stuff like that Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp Argh, good point let me see Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp Ok, i checked names and i even gave the full url of the pic, but still no joy :( damn Quote Link to comment Share on other sites More sharing options...
Patrick Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp try this : if ($ir['jail'] > 0) { print "<img src=THUGJAIL.jpg />"; } else { if ($ir['hospital'] > 0) { print "<img src=THUGHOSP.jpg />"; } else { print "<img src=Banner.gif />"; } } Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp I only tried with "/" because the other way didn't work, so i was just testing, i'll try that now patric Quote Link to comment Share on other sites More sharing options...
Patrick Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp by adding / the slash it makes sure that it is going in the Main folder of the site so if i would put a link like this (im in [url]www.site.com/Secure/index.php[/url]) <a href=index.php>Index Secure</a> << this would bring me back to the secure index and this >> <a href=/index.php>Index</a> would bring me back to [url]www.site.com/index.php[/url] Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp Hmm, i placed that code in, but... Still just showing the main banner lol!! Grrr, bet it's something simple like always :P Quote Link to comment Share on other sites More sharing options...
Patrick Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp i have no ideas why its not workin it should be fine Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp I thought that too :| Iv'e ran out of ideas :( lol Quote Link to comment Share on other sites More sharing options...
twist_killer Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp try this : if ($ir['jail'] > 0) { print "<img src=THUGJAIL.jpg />"; } else { if ($ir['hospital'] > 0) { print "<img src=THUGHOSP.jpg />"; } else { print "<img src=Banner.gif />"; } } it might be da capital letters in 'THUGHOP' AND 'THUGJAIL' Or it could be the curly braclet after else { if ($ir['hospital'] > 0) { it might be the other way round Quote Link to comment Share on other sites More sharing options...
Vorlen Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp if ($ir['jail'] > 0) { print "<img src=THUGJAIL.jpg />"; } else if ($ir['hospital'] > 0) { print "<img src=THUGHOSP.jpg />"; } else { print "<img src=Banner.gif />"; } else if is perfectly fine, and the else { if { will get confusing for the parser. Quote Link to comment Share on other sites More sharing options...
twist_killer Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp if ($ir['jail'] > 0) { print "<img src=THUGJAIL.jpg />"; } else if ($ir['hospital'] > 0) { print "<img src=THUGHOSP.jpg />"; } else { print "<img src=Banner.gif />"; } else if is perfectly fine, and the else { if { will get confusing for the parser. not to offend u but i wrote dat ^^ (unless ur meaning id different) Quote Link to comment Share on other sites More sharing options...
Vorlen Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp Wrote what????? I made it so that it doesn't say else { if { which the PARSER WILL NOT UNDERSTAND. it'll neglect the last else, and get all confused. I wasn't saying anything about the text, which, if I am correct, you did. Quote Link to comment Share on other sites More sharing options...
twist_killer Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp well if u look right at da bottom is says da same thing as u...exect dat u made it clearer. :mrgreen: Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp Ok, nothing seem's to be working, do i have to delete this from the header.php i just seen it and was wondering if it was relivant to keep it in? print "<center></center> As having this and the other code, there's 2 in there? Or wouldn't it matter... Quote Link to comment Share on other sites More sharing options...
Vorlen Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp Send me in PM a copy of your header, I'll fix it up for you :) Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp Does it matter where at in the file that we place that bit of code? Because I think we just have it in the wrong spot. Quote Link to comment Share on other sites More sharing options...
Vorlen Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp That'll make a pretty big difference yes. :P Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp I think i been trying to sort this for too long, damn lol!! Quote Link to comment Share on other sites More sharing options...
Vorlen Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp Let me know if the fix I sent you works :) Quote Link to comment Share on other sites More sharing options...
b-a-d-b-o-i Posted March 4, 2007 Author Share Posted March 4, 2007 Re: If user in jail/hosp THANKS SOOO MUCH lol..... That has been stressing me out lmfao!! Thumbs up bro i owe you 1 :) much appreciated!! Some rep for you there :D Quote Link to comment Share on other sites More sharing options...
Vorlen Posted March 4, 2007 Share Posted March 4, 2007 Re: If user in jail/hosp Thanks, like I said in PM, hope you enjoy it. :) 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.