Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
RevCms me.php
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JayC" data-source="post: 408540" data-attributes="member: 36373"><p>In RevCMS your credits are stored in your Session based on your login...</p><p></p><p>$_SESSION['user']['credits']; -> Thats how you access it. You can change it to do something like this:</p><p></p><p></p><p>[CODE]<?php</p><p> $getCredits = mysql_fetch_assoc(mysql_query("SELECT `credits` FROM ``users` WHERE `username` = '".$_SESSION['user']['username']."' LIMIT 1"));</p><p></p><p>echo $getCredits["credits"];</p><p>?>[/CODE]</p><p>[doublepost=1493748919,1493748461][/doublepost]Let me rephrase:</p><p></p><p>If you feel like doing this the seriously correct way, I would make a class in php that has functions that can retrieve the users information you want updated before they logout and login. This would include getCurrentLook, getCurrentCredits, getCurrentDiamonds, getCurrentPixels, getCurrentRank...</p><p></p><p>Then I would use AngularJS and Javascript to update all the labels on the page every 30 or so seconds with java script grabbing the results from the function.</p><p></p><p>That would make your page very dynamic and functional.</p></blockquote><p></p>
[QUOTE="JayC, post: 408540, member: 36373"] In RevCMS your credits are stored in your Session based on your login... $_SESSION['user']['credits']; -> Thats how you access it. You can change it to do something like this: [CODE]<?php $getCredits = mysql_fetch_assoc(mysql_query("SELECT `credits` FROM ``users` WHERE `username` = '".$_SESSION['user']['username']."' LIMIT 1")); echo $getCredits["credits"]; ?>[/CODE] [doublepost=1493748919,1493748461][/doublepost]Let me rephrase: If you feel like doing this the seriously correct way, I would make a class in php that has functions that can retrieve the users information you want updated before they logout and login. This would include getCurrentLook, getCurrentCredits, getCurrentDiamonds, getCurrentPixels, getCurrentRank... Then I would use AngularJS and Javascript to update all the labels on the page every 30 or so seconds with java script grabbing the results from the function. That would make your page very dynamic and functional. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
RevCms me.php
Top