Jump to content
MakeWebGames

Help Please MWG Members!


Recommended Posts

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!!!

Link to comment
Share on other sites

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 by sniko
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...