if something exists display X
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
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
and
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.
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";
}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.