kevj2 Posted July 12, 2009 Posted July 12, 2009 I am goin to be releasing an opern beta of my game and i was just wondering is there like any sort of code i could add to the registration that like counts the sign ups and dsiplays it and f it reach like 20 says like sorry max betta tester sign up? Thanks in advance Kevj2 :) :) :): :mrgreen: Quote
Magictallguy Posted July 13, 2009 Posted July 13, 2009 Re: mccodes v2 help I am goin to be releasing an opern beta of my game and i was just wondering is there like any sort of code i could add to the registration that like counts the sign ups and dsiplays it and f it reach like 20 says like sorry max betta tester sign up? Thanks in advance Kevj2 :) :) :): :mrgreen: $rows = $db->fetch_single($db->query("SELECT COUNT(userid) FROM users")); if($rows >= 20) { echo "Registration is closed until the game is brought out of beta"; exit; } Quote
3NG4G3 Posted July 13, 2009 Posted July 13, 2009 Re: mccodes v2 help Nice this worked for me +1 Quote
kevj2 Posted July 13, 2009 Author Posted July 13, 2009 Re: mccodes v2 help Does thast mean on the page you could put echo "There are $row Register "; and that woukd say how many have regiasterd already ? Quote
Magictallguy Posted July 14, 2009 Posted July 14, 2009 Re: mccodes v2 help Does thast mean on the page you could put echo "There are $row Register "; and that woukd say how many have regiasterd already ? echo sprintf("There %s %s player%s registered", ($rows == 1) ? 'is' : 'are', number_format($rows), ($rows == 1) ? '' : 's'); Output: There are 0 players registered There is 1 player registered There are 2 players registered There are 3 players registered etc.. Quote
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.