Parse multirow HTML table


Posted on 16th Feb 2014 07:03 pm by admin

Hello all,
I have a site I am working on. Its a sports site and I am trying to add stats to a DB. I have a table that will have varying amounts of rows depending on how many kids are on the team. I need to take the rows of the stats table and be able to add them to the DB with a single submit button. Here is the code for my table. The form is calling another php page for processing. I am thinking I will need a foreach to pull all the rows out of the table but not sure on how to reference the table in the POST.
Any help would be greatly appreciated.
Code: [Select]<table align="center" width="780 px" name="aStatsInput">
<tr>
<td align="center" colspan="14"><b>Away Team </b>Bushnell-Prairie City/Avon</td>
</tr>
<tr>
<th style="table-layout: fixed; align: left; width: 100 px;">Player</th>
<th>fgM</th>
<th> fgA</th>

<th> ftM</th>
<th> ftA</th>
<th> 3ptM</th>
<th> 3ptA</th>
<th> OReb</th>

<th> DReb</th>
<th> Assts</th>
<th> Steals</th>
<th> Fouls</th>
<th> TFouls</th>

<th> Turnovrs</th>
</tr>
<tr bgcolor="white" id="row1">
<td>Hulett Dewain</td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>

<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
</tr>
<tr bgcolor="#aaaaaa" id="row2">
<td>Powell Cory</td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>

<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
<td><INPUT name="" type="text" size="1"></td>
</tr>
</table>

No comments posted yet

Your Answer:

Login to answer
108 Like 8 Dislike
Previous forums Next forums
Other forums

Email/MMS to Site
Hey guys. I'm looking for a way for a user to upload images and/or text via their cell phones. It

Locking mysql tables with php
Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ

How to show more than 1 users with this code...
Hello,
i have a table that shows users only if I, as Administrator, want to be shown. But its sho

javascript in php code causes page to display white
Hi All,

Odd one this, I've got the following code (below) which is a simple log in form. The

browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w

Must be a string? Huh, what? HELP?
with the following script, I get
Fatal error: Property name must be a string in /home/content/e/

SQl num_rows problem
when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysq

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

Help with setcookie()
Merry Xmas to those on this foruum
Older guy here with some experience but not allot so please be

I got my hosting suspended XD
So I saw this challenge a day or so ago

http://www.programming-challenges.com/pg.php?page=dow

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash