Jump to content
MakeWebGames

Recommended Posts

Posted

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 "THUGJAIL.jpg

";

}

else

{

print "Banner.gif

";

}

{

if ($ir['hospital'] > 0)

{

print "THUGHOSP.jpg

";

}

{

else

{

print "Banner.gif

";

}

{

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!!

Posted

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>";

Posted

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 "THUGJAIL.jpg

";

}

if ($ir['hospital'] > 0)

{

print "THUGHOSP.jpg

";

}

else

{

print "Banner.gif

";

}

print "</td><td>";

Still no joy :(

Posted

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

Posted

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 />";

}

}

Posted

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]
Posted

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

Posted

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.

Posted

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)

Posted

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.

Posted

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>Banner.gif</center>

As having this and the other code, there's 2 in there? Or wouldn't it matter...

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...