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 with Attachments in PHP
Hi Friends

How to send email in PHP with attachment.
I know simple mail can be sent with

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

How to pass parameter to tag query?
Hi,
I want to get the value of a tag at a specific time (like 10/27/09 15:29:59), I need to giv

Need a Timecode Class...
Not a Time Stamp, Time Code. Format is a bit different. HH:MM:SS:FF where FF is Frames. I dont re

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The

Help =( !! Upload Pics [PHP script]
Hello
I need help with a php script [MULTIPLE UPLOAD IMAGES] , where I want to add a feature (wat

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

Trying to add functions to table
I have this list of characters and I'm trying to figure out what I have to do to put the results of

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