Jump to content
MakeWebGames

If user in jail/hosp


b-a-d-b-o-i
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :(

Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...