Need help with PHP coding fast Sometimes a professional is the best answer
I’m looking for a source of information that will provide me instructions on how to build a PHP page like this:
It’s going to be a page which calculates the position of a sporting team on a ladder depending if they win or lose.
The user will input two teams and their scores. A win is worth 4 points and a loss is 2. The points inputted will determine the winner. The PHP coding then calculates both of the teams new position on the ladder.
That sounds really easy. Roughly what I have below should set you in the right direction:
<form action(just handle on this page) method="POST">
Select the winning team:
<select>
<option …..team names…
<option …..
etc
Select the second team:
<select>
<option …..team names…
<option …..
etc
sumbit button and end form.
<?php
$winner = $_POST['...option from select one..']
$looser = $_POST['....option from select two...']
for (i=0;i<totalnumberofteams;i++)
if (team[i] = $winner){
team[i][score] = team[i][score] +4;
}
some for losers if you need to add two to their score.
This is really beginner php stuff, why not start working through a tutorial like the one below:
Sometimes getting professional help with php programming issues is the solution. There companies like Iflexion that can help. It never hurts to call a professional.
That sounds really easy. Roughly what I have below should set you in the right direction:
<form action(just handle on this page) method="POST">
Select the winning team:
<select>
<option …..team names…
<option …..
etc
Select the second team:
<select>
<option …..team names…
<option …..
etc
sumbit button and end form.
<?php
$winner = $_POST['...option from select one..']
$looser = $_POST['....option from select two...']
for (i=0;i<totalnumberofteams;i++)
if (team[i] = $winner){
team[i][score] = team[i][score] +4;
}
some for losers if you need to add two to their score.
This is really beginner php stuff, why not start working through a tutorial like the one below:
References :
http://www.tuxradar.com/practicalphp/