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

Unidentified index error in a simple form
I have been trying to make an HTML form that is handled by a PHP script. So far my attempts to get i

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

gettext translates ALWAYS?
I'm using gettext with the new version of XAMPP (5.3.0) on Windows Seven RTM (build 7600)
gettext

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

Delete HTML file after loading
I have limited experience with php and its been a year or two since I've last used it. I have a sma

Weird problem with SELECT command..Help!
Hi!

It seems I'm having a really weird problem with SQL SELECT command....I have table into a

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

How to login with SAPCPIC userid
I have changed the Password for SAPCPIC in Development Server for 000,001 and 100 client.
But w

understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";

function get_nam

mysqli_fetch_assoc returns multiple arrays, how to return a single array
Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:

Code

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