goobs1997
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 31 |
|
|
| 30 May 2012 11:54 PM |
I am trying to make a website like roblox, in which you login every 24 hours and gets coins. How would i make that? |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 31 May 2012 12:03 AM |
| Just save the last login time, if that login time is today, no tokens. If it is not, tokens! :D |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 31 May 2012 12:57 AM |
| Store the next time they can login to receive tokens (current time + 24 hrs). Each time the log in, check to see if the current time is >= the time stored on the server. |
|
|
| Report Abuse |
|
|
rp069
|
  |
| Joined: 22 Apr 2011 |
| Total Posts: 6206 |
|
|
| 31 May 2012 03:51 AM |
| @pwnedu wouldn't it be 23:59? because counting from login |
|
|
| Report Abuse |
|
|
|
| 31 May 2012 10:19 AM |
| Wait, is this a game? Or a real website? |
|
|
| Report Abuse |
|
|
rp069
|
  |
| Joined: 22 Apr 2011 |
| Total Posts: 6206 |
|
|
| 31 May 2012 10:21 AM |
| a real website, I can do HTML and CSS but hooking into databases? nope. |
|
|
| Report Abuse |
|
|
|
| 31 May 2012 10:22 AM |
Hmm wow.
HTML won't cover all this. HTML+JavaScript will though :3 |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 31 May 2012 10:22 AM |
| You can find easy tutorials about mysql |
|
|
| Report Abuse |
|
|
|
| 31 May 2012 10:25 AM |
-faicpalm-
didn't read title >.< |
|
|
| Report Abuse |
|
|
| |
|
| |
|
keehl254
|
  |
| Joined: 08 Sep 2010 |
| Total Posts: 131 |
|
|
| 21 Oct 2012 12:45 AM |
I'm fluent in HTML, CSS, PHP, LUA, VS, and MYSQL
I have a website that is for Roblox Scripting. It uses points instead of coins.
I recommend using a login timeout. For example most login systems use a
session_start();
$_SESSION = array();
For the logout, i recomend using session_destroy();
to end the login session
Now in the login file, Where it tests the login seesion to see if the user uses the correct info, put a script like:
Your database may be diffrent then mine, so heres the key
Users = The table where the Users data is held Points = For your case is Coins + '4' = how many points are added Where Username = Where in the database the persons username = '$user' $user = the name of the user
mysql_query("UPDATE Users SET Points = '$points' + '4' WHERE Username = '$user'"); return $points; |
|
|
| Report Abuse |
|
|
keehl254
|
  |
| Joined: 08 Sep 2010 |
| Total Posts: 131 |
|
|
| 21 Oct 2012 01:18 AM |
Actually teh part where it says "return $points;
Remove that, i made mine into a function, u dont want to :P |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 21 Oct 2012 01:19 AM |
| Why would you bump a 5 month old thread? |
|
|
| Report Abuse |
|
|
goobs1997
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 31 |
|
| |
|
|
| 22 Nov 2012 10:56 AM |
Why did you bump this?
idiot....
|
|
|
| Report Abuse |
|
|
|
| 30 Jan 2013 09:33 PM |
| Maybe if you had a service that runs in the background and checks every 24 hours to update the database? |
|
|
| Report Abuse |
|
|
|
| 30 Jan 2013 11:03 PM |
| Ew. Javascript is horrid. Unless using JQuery. |
|
|
| Report Abuse |
|
|
rp069
|
  |
| Joined: 22 Apr 2011 |
| Total Posts: 6206 |
|
|
| 30 Jan 2013 11:05 PM |
| JavaScript is the damn best language out there and don't you forget it. |
|
|
| Report Abuse |
|
|
|
| 30 Jan 2013 11:07 PM |
It's ugly in my opinion (and many other's). JQuery FTW.
$('.MultilineTextBox').css('overflow-y', 'scroll').css('height', '400px');
Try doing the same thing equally sized or smaller in javascript. |
|
|
| Report Abuse |
|
|
rp069
|
  |
| Joined: 22 Apr 2011 |
| Total Posts: 6206 |
|
|
| 30 Jan 2013 11:14 PM |
| I would write a page but I honestly can't be parsed. |
|
|
| Report Abuse |
|
|