473,472 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can i make a simple scoring system in php?

8 New Member
ive been working on a php project in which the main function is to add and record scores of a basketball game, but not necessarily by all the players but the score of a team, im having problem in computing for scores, i use switch statement that add 1, two , or three points to the initial score 0, but always return the same value as to what button is clicked, i dont know what logic is needed to make this work..

can anyone help??

any help would be much appreciated,thank you
Feb 26 '11 #1

✓ answered by dgreenhouse

You obviously need to store the values somehow; either in a database or a text file. Also, you'll probably want to structure your application to organize the stored information as: games, teams, team-scores. You'd need to either use "Sessions" or send some kind of value(s) to the application indicating which game/team scores the point(s).

i.e.
score.php?game=1&team=1&points=3
score.php?game=6&team=1&points=2
score.php?game=10&team=2&points=1

2 3645
dgreenhouse
250 Recognized Expert Contributor
You obviously need to store the values somehow; either in a database or a text file. Also, you'll probably want to structure your application to organize the stored information as: games, teams, team-scores. You'd need to either use "Sessions" or send some kind of value(s) to the application indicating which game/team scores the point(s).

i.e.
score.php?game=1&team=1&points=3
score.php?game=6&team=1&points=2
score.php?game=10&team=2&points=1
Feb 26 '11 #2
natznetznitz
8 New Member
thanks..eventhough i didn't really understand your syntax, but your the logic you've given really works..

thanks a lot..my project is done now..
Feb 27 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: gabor | last post by:
hi, i'm developing an application which many times downloads differents stuff from http. for this i'd need a quick way to create a cgi to for example return always error 503. so that i can...
6
by: Kleidemos | last post by:
If I implement a simple RTTI system, more simple than C++ RTTI system for my program and this system is plus or minus: #define DEF_RTTI_BASE(name) virtual inline const char *Name(){ return...
20
by: Greg | last post by:
I am trying to write a simple file system using c. It will consist of frames of 512 bytes, and will have a superblock etc. From the outside it will appear as a single file in UNIX. I want to...
7
by: Saadi | last post by:
Hey Guys, I am looking to develop a simple infact a very simple Operating System, to submit as my BS final project, which can independently start the computer and some simple application which...
2
by: Doug | last post by:
I've installed ASP.NET onto our web server (Win2k/unsure of IIS version) this morning. I created a simple ASPX page in Notepad that writes out an asp:Label control to the page and dynamically...
0
by: Link | last post by:
hello i want to make simple server client system that send data like that one : http://www.eggheadcafe.com/articles/20020323.asp just no console app well i want to make form with 2...
3
by: Henrik | last post by:
Hi all, I'm a .net developer working with developing automation equipment for the sawmill industry. The main focus of our product line is mechanical and measurement equipment but our clients...
2
by: miladhatam | last post by:
did you write any code about simple chat system in a personal site between 2 persons i don't know what is the data structure of that or database will be needed ? thanks ...
2
by: tamasuka | last post by:
?????I Dont kNow how to create A billing system Using MS Access
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.