Jump to content
Larry Ullman's Book Forums

TFDM

Members
  • Posts

    4
  • Joined

  • Last visited

TFDM's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. That looks a very pretty site indeed. I used to always root for Juventus during the 90's when Chanel 4 in the UK used to show a Sunday match from Serie A. I'm a Darlington FC supporter. We're in the Blue Square Premier (the top level of English non-league football) after getting relegated at the end of the 2009/10 season from the Football League. However we're recovering well. We won the FA Trophy at Wembley a couple of weekend's ago - pretty much the FA Cup of the non-league. Highlights of the game below (we also play in black and white). We scored the winner in the last minute of extra time. A very special moment. I used to run www.loidland.net but stopped updating in January as I was struggling to give it the time it deserved. I contribute match reports to www.darlofc.co.uk now. My latest project is to try and create an on-line database of all the club's fixtures since 1908, the line-ups and player stats. Its going to be a long job but something I can chip away at for a few years and build up.
  2. Thank Antonio. That makes perfects sense. Don't know why I didn't think of doing that.
  3. The echo's are me being lazy. I'm mainly just trying to get it working with the intention of cleaning it up later. I've got no problem with the getting the data out of the database or into it. I'm just looking at the logic behind reading the $_POST content of each row in the table. Hopefully that makes sense....
  4. Hi everyone, I'm wondering if you could help me with what is starting to give me a bit of a headache. I am trying to create a league table and then store this information in a database. However I am struggling a bit with it. So far I have the following code.... echo '<form action="#" method="post">'; echo '<table>'; echo '<tr>'; echo '<td>Position</td>'; echo '<td>Club Name</td>'; echo '<td>Ply</td>'; echo '<td>Won</td>'; echo '<td>Drw</td>'; echo '<td>Lst</td>'; echo '</tr>'; echo '<tr>'; echo '<td><input type="hidden" name="row[1]" value="1"> <input type="text" name="position[1]" maxlength="50" /></td>'; echo '<td><input type="text" name="clubName[1]" maxlength="50" /></td>'; echo '<td><input type="text" name="played[1]" maxlength="50" /></td>'; echo '<td><input type="text" name="won[1]" maxlength="50" /></td>'; echo '<td><input type="text" name="draw[1]" maxlength="50" /></td>'; echo '<td><input type="text" name="lost[1]" maxlength="50" /></td>'; echo '</tr>'; echo '<tr>'; echo '<td><input type="hidden" name="row[2]" value="2"> <input type="text" name="position[2]" maxlength="50" /></td>'; echo '<td><input type="text" name="clubName[2]" maxlength="50" /></td>'; echo '<td><input type="text" name="played[2]" maxlength="50" /></td>'; echo '<td><input type="text" name="won[2]" maxlength="50" /></td>'; echo '<td><input type="text" name="draw[2]" maxlength="50" /></td>'; echo '<td><input type="text" name="lost[2]" maxlength="50" /></td>'; echo '</tr>'; echo '<tr>'; echo '<td><input type="hidden" name="row[3]" value="3"> <input type="text" name="position[3]" maxlength="50" /></td>'; echo '<td><input type="text" name="clubName[3]" maxlength="50" /></td>'; echo '<td><input type="text" name="played[3]" maxlength="50" /></td>'; echo '<td><input type="text" name="won[3]" maxlength="50" /></td>'; echo '<td><input type="text" name="draw[3]" maxlength="50" /></td>'; echo '<td><input type="text" name="lost[3]" maxlength="50" /></td>'; echo '</tr>'; echo '<table>'; As you can see I have a table with some rows. Each row represents a position in the league table. I'll be using some javascript at a later date to control the addition of new rows. What I want to do in php is loop through of the table's row and insert the position, club name, games played, wins, defeats and draws. Once that is done I want to go to the next row and repeat this step until all of the form fields have been done. I figured this would be a simple case of looping through all the form fields on the page but it doesn't seem quite that simple. Feel free to change the html mark up if you think I'm going wrong there.... Appreciate any help. Been banging my head against the wall now for a few hours with this. Not sure I can see the wood for the trees now...
×
×
  • Create New...