Reputation: 65 Whiz
- Active Members
- Active Posts:
- 241 (0.14 per day)
- 22-November 10
- Profile Views:
- Last Active:
- Oct 24 2014 09:38 PM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
Posts I've Made
Posted 14 Oct 2014Well, if your going to store the round value in the players table, everyone starts at round 1 and therefore each players round value should be 1. As each player wins a round, you could increment the round value by 1.
Also, if you need to display the history of the tournament then you may want to include a table which stores the history of each player (position for each round).
Posted 13 Oct 2014If it was me I would only have one player in a table similar to your second approach. I would also store the current position of the player. For example Player 1 is 1st place and position 1, Player 2 is 16th place and position 2, etc. Positions 1 and 2 will always play each other, positions 3 and 4 will always play each other, etc..
If you view the players as having positions and ranks like the example above, you can calculate the winners position by ceil(currentPostion / 2), Just be sure to update the player position after each win. I hope that helps.
Posted 26 Aug 2013Hopefully this PSD to HTML tutorial will be helpful. I used it many years ago and found it useful at the time so maybe you will too
Your main focus point is most likely the CSS and layout design.
Posted 18 Aug 2013This isn't my usual late night dozing off post so hopefully this will be more hopeful then the previous posts. In my opinion, you are writing your logic backwards. Your flow of logic should be something along the lines of:
1. Check if the user is a regular user
2. If the user is a regular user, redirect them to the logout page or some other non admin page
3. Otherwise, we know the user is an admin so continue on with admin functionality
QuoteWhen i go to url.com/Admin/AddAdmin It will only bring up the Admin/Index instead of going through to the AddAdmin. I know its cause of the $this->Index(); what would be the best way to stop that from happening?
This is most likely because of exit(0); after you call $this->Index() and AddAdmin(); never runs.
However, if you restructure your logic to follow a similar logical flow mentioned above, your application should route the user to the proper function(s) in your Admin controller. This will also remove the need of redirects and internal routing in your constructor, and in my opinion, a cleaner logical flow. Just remember, any logic you place within your Admin constructor will execute on every request that is routed to the Admin controller.
Posted 16 Aug 2013Ok, can you elaborate you little more as to how it didn't quite work??
- Member Title:
- D.I.C Head
- Age Unknown
- Birthday Unknown
- Years Programming:
- Programming Languages:
Familiar: C#, Java, C++, some others
- Website URL: