if something exists display X

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Ah, missed that part.
blade_922
Forum Contributor
Posts: 132
Joined: Wed Jul 12, 2006 4:57 pm

Post by blade_922 »

Hey


Jcart, robshanks and everybody else who helped, i thank you! Its working fine now.

Cheers for all your help, if i develop any other problems i'll use this thread.

Cya around.
blade_922
Forum Contributor
Posts: 132
Joined: Wed Jul 12, 2006 4:57 pm

Post by blade_922 »

Ok hey guys,

Nothing wrong with that piece of code but i do have another question.

I need to put the script into another page

So currently i have this

Code: Select all

$checkstrike=mysql_query("SELECT * FROM ladder_$ladder[id] where teamid='$teamid'"); 
$checkstrike=mysql_fetch_array($checkstrike); 
$output=array("-","-","-"); 
if(strlen(trim($checkstrike['strike_1']))>0) 
{ 
  $output[0]="X"; 
} 
if(strlen(trim($checkstrike['strike_2']))>0) 
{ 
  $output[1]="X"; 
} 
if(strlen(trim($checkstrike['strike_3']))>0) 
{ 
  $output[2]="X"; 
}
and

Code: Select all

<td width='9%' valign='center' align='center'><b><font face='verdana' size='-2' color='red'>". implode('', $output)."</font></b></td>

So all is good there. Now i want to put this code in another page. This other page doesnt have anything defined for $ladder[id] for the table ladder_$ladder[id]

How would i define this in general terms, i'll try work this out with your guidance.
Post Reply