pyro.699
10-30-2005, 12:16 PM
$rpgstats = '';
foreach ($post as $postkey => $postvalue)
{
if (strpos($postkey, 'rpg_') !== false AND $postvalue)
{
$rpgstats .= ucwords(str_replace( 'rpg_', '', $postkey)) . ': ' . $postvalue . '<br />';
}
}
Ok, SirAdrian made me this code. And if i understand correctly this is what it dose
I have 24 feilds
rpg_name
....
....
rpg_clan
what he has done, is, it checks to see if the feild is filled in, if its not, it dosent display anything! but, if it is filled in it looks something like this
Name: Kane
....
....
Clan: Frozen Creations
(there is a sererate script that adds the variables!)
Ok, no, what i would like to add to the script, is so it will only display certian ones, so the code would be something liek this.
Note: the following feilds, are in the thread table.
Note: the '_int' is correct, as when you post, a nother script sets it to 1 or 0, depending on if you chose it.
<if condidion="$threadinfo[rpg_name_int] = 1">
So, if the coloum rpg_name_int was set to 1 it would post it, if not, it would ignore it!
</if>
Thankyou in advance!
foreach ($post as $postkey => $postvalue)
{
if (strpos($postkey, 'rpg_') !== false AND $postvalue)
{
$rpgstats .= ucwords(str_replace( 'rpg_', '', $postkey)) . ': ' . $postvalue . '<br />';
}
}
Ok, SirAdrian made me this code. And if i understand correctly this is what it dose
I have 24 feilds
rpg_name
....
....
rpg_clan
what he has done, is, it checks to see if the feild is filled in, if its not, it dosent display anything! but, if it is filled in it looks something like this
Name: Kane
....
....
Clan: Frozen Creations
(there is a sererate script that adds the variables!)
Ok, no, what i would like to add to the script, is so it will only display certian ones, so the code would be something liek this.
Note: the following feilds, are in the thread table.
Note: the '_int' is correct, as when you post, a nother script sets it to 1 or 0, depending on if you chose it.
<if condidion="$threadinfo[rpg_name_int] = 1">
So, if the coloum rpg_name_int was set to 1 it would post it, if not, it would ignore it!
</if>
Thankyou in advance!