Breana Posted May 13, 2008 Share Posted May 13, 2008 I want it to read the table and if the value is less "needed 500" total on table 40 it will show the else option... {if $user->user_info.user_points - 5000} <table width='760' border='0' cellspacing='0' cellpadding='0'> <tr> <td width='171'>error no points</td> </tr> </table> {else} <form action='../submit.php' method='post'>able info here! </form> {/if} But it don't work i have 5670 points and it says i have no points?? Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/ Share on other sites More sharing options...
BlueSkyIS Posted May 13, 2008 Share Posted May 13, 2008 the code you posted doesn't look like PHP. ??? Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/#findComment-540091 Share on other sites More sharing options...
Breana Posted May 13, 2008 Author Share Posted May 13, 2008 It is, the {if} tags are used in my .tpl files it replaces the default <?php tag! Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/#findComment-540093 Share on other sites More sharing options...
BlueSkyIS Posted May 13, 2008 Share Posted May 13, 2008 can you translate it for us? i'm not sure i can give you an answer that you can plug back into your template. Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/#findComment-540098 Share on other sites More sharing options...
Breana Posted May 13, 2008 Author Share Posted May 13, 2008 Ok, it runs just like php but u can use it in the .tpl files. example: "this code is Working" {if $total_friends != 0} <table cellpadding='0' cellspacing='0' width='100%' style='margin-bottom: 10px;'> <tr><td class='header'> {$profile35} ({$total_friends}) [ <a href='profile_friends.php?user={$owner->user_info.user_username}'>{$profile25} {$profile19}</a> ] </td></tr></table>{/if} Output looks like this: ------------------------- You have 36 friends. link: Edit Friends List ------------------------- Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/#findComment-540104 Share on other sites More sharing options...
BlueSkyIS Posted May 13, 2008 Share Posted May 13, 2008 i meant translate the syntax to PHP. maybe it's supposed to be this? {if $user->user_info.user_points < 5000} Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/#findComment-540126 Share on other sites More sharing options...
Breana Posted May 13, 2008 Author Share Posted May 13, 2008 I tried the < no affect... I want to translates this into this the {if} statement. if($user->user_info[user_points]-5000) { error not enough points {else} my form here button yadda yadda... } Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/#findComment-540136 Share on other sites More sharing options...
Breana Posted May 13, 2008 Author Share Posted May 13, 2008 *BUMP* Anyone? Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/#findComment-540197 Share on other sites More sharing options...
Breana Posted May 13, 2008 Author Share Posted May 13, 2008 It was a dam cache issue, i should have never added that feature Link to comment https://forums.phpfreaks.com/topic/105452-solved-if-statement-issues/#findComment-540222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.