Hi all,
I am new to this forum... It has been awhile since i have worked with arrays, and i am starting to pull my hair out with this little issue i am having..
I hope someone can help me out with it, or even possibly show me a better way of doing this.
I am creating an web based hockey stats program for a ball hockey league.
I have a score sheet where they enter data. The score sheet gets constructed in a single form with a row for each player on the team. there are 12 players on each team so there will be 24 rows of data in the end.
I need to store each players game stats individually in a stats table where i can keep track of player game stats for each game.
here is the code for my form.
Code: while ($r_hmp = mysql_fetch_array($q_hm_play)) {
echo "<tr>";
echo "<td>".$r_hmp['jnum'] ."</td>";
echo "<td>".$r_hmp['lname'].", ".$r_hmp['fname']." ( ".$r_hmp['position'] ." )<input type='hidden' name='pid[]' value='".$r_hmp['id']."'></td>n";
echo "<td><input type='text' name='gp[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='g[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='a[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='pns[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='pim[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='gw[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='pg[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='sg[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='pa[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='sa[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='soa[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='sog[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='psa[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='psg[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='mj[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='mc[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='gm[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='gr[]' size='2' maxlength='2'></td>n";
echo "<td><input type='text' name='mt[]' size='2' maxlength='2'></td>n";
echo "</tr>n";
$hi++;
one the score keeper clicks the save button i am trying to create a multi-leveld array where i store 24 rows of data
each row should hold the players id and his particular stats for the game.
i tried to setup my array so i could loop troug it using two counters $player[$i][$x] where i would be the count of the row and x being the stat data.
here is the code i have tried, and to no avail.... your help with this would be greatly appreciated. I am sure there is a simple solution to this, but i am stuck and can't seem to find any info that might point me in the right direction.
thanks in advance
Code: $hmpc = count($_POST['pid']);
$i = 0;
while ($i <= $hmpc) {
$player = array($_POST['pid'],array($_post['gp']);
$i++;
}
$i = 0;
$x=0;
echo $hmpc;
while ($i < $hmpc) {
while ($x < $hmpc) {
echo 'Player Data: '.$player[$i][$x];
$x++;
}
$i++;
disable all input buttons
Hello Friends,suppose i do have a file ( file.php ) has a submit buttonCode: [Select]<input type=submit name=add value=go> is there any way so i can make the button shown but in same
Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that I can base everything off one root and work with that, but I'm having a problem with popups
Best way to cross matching large datasets
Hi,Im running a script where am I cross matching about 200 000 data sets with each other. Each data set consists of 8 parameters and I want to count all datasets which have similar or the same
parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which where really function calls.Here is a few lines that make up the menuCode:
Linking with Foreign Keys
I have been getting an erro when I try and link:
Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.It goes something like this:REQUEST_URI="/page.php?var1=foo&var2=bar"Now, what I want to do
why this query can delete duplicates ?
why this query can delete duplicates ? Anybody can give me the detailed explanation ?
Curl & sessions PLS HELP
Hello,I have a problem with curl and sessions and i will try to explain the best i could.01. I want to download a file from (http://subdomain.example.com/name-13075.html) with curl.02. The problem is:
PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server running apache. This server is scheduled to run a script every 5 minutes that will send an email to 10
ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords aligned by our active directory to the same as those used to access the Network. My query is that we