Toasty Developers Posted January 5, 2013 Share Posted January 5, 2013 Okay guys , some of you may know me but most wont . I am a graphic designer and i came across this website and i decided to sign up so that i could build my portfolio . Now i have completed 2 designs related to web games for my portfolio but i have come to a point where i need support. 1.The first point i need help on is Dreamweaver , so i have a design and i have sliced the design and opened it up in Dreamweaver ( please note this design is a login) . I need to put the elements for the Login on the design so i have succesfully put a login form on the design and the login does work but what my problem is that how do i make it so that the username and password box stays in the same place and the layout looks the same when i use a different browser and also when i am not in fullscreen . Hope you understand that because i dont know how to exactly explain it . 2. The secound point is that how to i show how many users are online in the game on the login, i only need to show the number and thats about it . Thanks for your help in advance MWG!!! Quote Link to comment Share on other sites More sharing options...
The Phantom Posted January 5, 2013 Share Posted January 5, 2013 I can do that (: All you will need is a SQL and a bit of coding (: Quote Link to comment Share on other sites More sharing options...
Toasty Developers Posted January 5, 2013 Author Share Posted January 5, 2013 Hey , I was looking for more of a explanation on how to do as if someone is kind enough to explain both these points to me then i will be grateful and it will help me alot when i am creating designs . Thanks guys. Quote Link to comment Share on other sites More sharing options...
sniko Posted January 5, 2013 Share Posted January 5, 2013 (edited) I believe login already has a connection to the database, and uses the class, so; /* * Count the amount of rows (userid) from users table where their last action is more than (or equal to) the current time minus 600 seconds) */ $get = $db->query("SELECT COUNT(`userid`) AS amount FROM `users` WHERE `last_action` >= (unix_timestamp()-600)"); $r = $db->fetch_row($get); echo '<strong>Users Online</strong> '. number_format($r['amount']); (I don't have the database structure with me, now. I guessed last_action column name, you'd need to confirm that) Edited January 5, 2013 by sniko Quote Link to comment Share on other sites More sharing options...
Djkanna Posted January 5, 2013 Share Posted January 5, 2013 I believe login already has a connection to the database, and uses the class, so; /* * Count the amount of rows (userid) from users table where their last action is more than (or equal to) the current time minus 600 seconds) */ $get = $db->query("SELECT COUNT(`userid`) AS amount FROM `users` WHERE `last_action` >= (unix_timestamp()-600)"); $r = $db->fetch_row($get); echo '<strong>Users Online</strong> '. number_format($r['amount']); (I don't have the database structure with me, now. I guessed last_action column name, you'd need to confirm that) `laston` I think. Quote Link to comment Share on other sites More sharing options...
Toasty Developers Posted January 6, 2013 Author Share Posted January 6, 2013 Hey , thanks guys for replying to the 2nd question I will try it in the morning . Please can someone also help for the first question Thanks MWG Quote Link to comment Share on other sites More sharing options...
Someone Posted January 6, 2013 Share Posted January 6, 2013 If you have some sample markup, or a link to the page, it will be easier to give advice. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.