PHP Question

by Tropical - 22-06-2015, 06:02 AM
Fulltime Member
Posts:
1,134
Joined:
Apr 2015
Likes:
51
Credits:
117
Reputation:
37
2 Years of Service
#1
OP
Posted: 22-06-2015, 06:02 AM (This post was last modified: 22-06-2015, 06:26 AM by Tropical.)
So,
I coded a HTML/CSS pricing table into an upgrade page.

I need to add a bit of PHP to the buttons but not sure how to go about it.
-

I basically wanna add something like {if user is not in group show <div class="blah">BUY</div> else if user is in group show <div class="blah">ALREADY UPGRADED</div>}
and so on ..

I can figure out the rest on where to add it.
Somebody lead me in the right direction, please  :noh:
Buy Private Proxies
@Believer rocks
Paradigm
Posts:
1,332
Joined:
May 2015
Likes:
49
Credits:
12
Reputation:
50
2 Years of Service
#2
Posted: 22-06-2015, 06:16 AM
@akay is good with mybb. I need to fiddle it omg
Fulltime Member
Posts:
1,134
Joined:
Apr 2015
Likes:
51
Credits:
117
Reputation:
37
2 Years of Service
#3
OP
Posted: 22-06-2015, 06:21 AM (This post was last modified: 22-06-2015, 06:43 AM by Tropical.)
(22-06-2015, 06:16 AM)Kill Wrote: @akay is good with mybb. I need to fiddle it omg

I think I did this code correct, i dunno..
PHP Code:
<if $usergroup ['gid'] == 11 then><class="btn">ALREADY UPGRADED</a><else><class="btn">BUY</a></if> 

I figured this out myself, it was:
PHP Code:
<if $mybb->user['usergroup'] == "11" then>
<
class="btn">ALREADY UPGRADED</a>

<elseif 
$mybb->user['usergroup'] == "9" then>
<
class="btn">BUY</a>
</if> 

We are!
Posts:
1,044
Joined:
Jan 2015
Likes:
108
Credits:
1,954
Reputation:
25
3 Years of Service
#4
Posted: 22-06-2015, 08:12 AM
Congratulations on fixing it yourself.
Tropical
23-06-2015, 12:51 AM
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)