Closed Thread Icon

Topic awaiting preservation: PHP help (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12591" title="Pages that link to Topic awaiting preservation: PHP help (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: PHP help <span class="small">(Page 1 of 1)</span>\

 
Duck
Paranoid (IV) Inmate

From: Stl, MO, USA
Insane since: Dec 2002

posted posted 01-26-2003 02:54

Im trying to add images to the ranking of the clan according to the streak but... they all show up hot? suggestions?
=1]http://www.socomxtreme.com/standings.php?ladder[id]=1
this is what i added to the script except for the addition to the tables...

I also don't really know anything about PHP...

if(!$ladder[streak]){
$steak="WHERE streak > 4";

$streakicon="<img src='hot.gif'>";

}else{

$streak="WHERE streak > 0";

$streakicon="<img src='cold.gif'>";
}

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-26-2003 03:22

Duck: I must admit this felt like I was reading a foreign language:

quote:
Im trying to add images to the ranking of the clan according to the streak but... they all show up hot?



However, the example page helped but the amount of code you've given doesn't

I'd recommend something like:

code:
if ($streak > 4) {
$icon = 'hot';
}
else {
$icon = 'cold';
}
$streakicon = "<img src=\"$icon.gif\">";



but why there are bits of what look like SQL mixed in there makes me wonder if there are missing bits of the puzzle I'm not aware of.

___________________
Emps

FAQs: Emperor

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 01-26-2003 03:23

On top of which the $steak variable in there probably isn't helping much....


Duck
Paranoid (IV) Inmate

From: Stl, MO, USA
Insane since: Dec 2002

posted posted 01-26-2003 03:44

ok lol now they are all cold...

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-26-2003 04:05

Duck: It will if there is something else wrong with your script and we'd really need to see where you are getting the $streak variable from.

DL: Mmmmmmmmm $steak

___________________
Emps

FAQs: Emperor

Duck
Paranoid (IV) Inmate

From: Stl, MO, USA
Insane since: Dec 2002

posted posted 01-26-2003 04:10

The streak is from the last games played like if u lost u are -1
im sure u prolly know that

ill be on icq in 15 min want me to send u the .php im working with

the founder bought the script and the maker wont help us do these he just told us how and he was wrong lol... the way he said didnt work and what i did... did work

will u be on icq in like 15 min? this php is confusing the hell outa me

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-26-2003 04:48

Duck: I'm putting the kettle on to make a nice big mug of hot choclate and am then sneaking off to bed but I'm online now if you want to hit me with that script (numbers in the profile).

___________________
Emps

FAQs: Emperor

Duck
Paranoid (IV) Inmate

From: Stl, MO, USA
Insane since: Dec 2002

posted posted 01-26-2003 04:55

hmmm howcome i cant see you...

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 01-26-2003 19:30

For anyone who's following along at home, it turns out that the IF block using the $streak variable happened before $streak had been filled from the database. We put that block after the query that assigns $streak, and suddenly it all works like a charm.

« BackwardsOnwards »

Show Forum Drop Down Menu