Jump to content

Recommended Posts

<br /><option value = '17'>17</option><br />

 

I do know that the code there should be:

 

<option value='17'>17</option> 

 

without the spaces/br's. HTML can be sensitive to spaces after a variable name.

<div id='header'>Enter player results for <?php echo fdate($gamedate)?></div><br /><br />
<?php
      $result = mysql_query("SELECT id, name, team FROM players WHERE team in ('$visitor','$home') AND year='$year' ORDER BY team, name");
      $count = mysql_num_rows($result);
      $teamck = "";
      $i = 1;
      echo "<form method='post' action=''>";
      echo "<table>";
      echo "<tr><td colspan='14'><input type='hidden' name='count' value='" . $count . "'>";
      echo "<input type='hidden' name='date' value='" . $gamedate . "'></td></tr>";
  while ($myrow = mysql_fetch_assoc($result)) {
    $id = $myrow["id"];
    $team = $myrow["team"];
    if ($teamck != $team) {
          echo "<tr><td colspan='14' align='center'>$team</td></tr> 
                  <tr>
                    <td>Name</td>
                    <td>Order</td>
                    <td>POS</td>
                    <td>AB</td>
                    <td>R</td>
                    <td>1B</td>
                    <td>2B</td>
                    <td>3B</td>
                    <td>HR</td>
                    <td>RBI</td>
                    <td>SF</td>
                    <td>BB</td>
                    <td>K</td>
                    <td>E</td>
                  </tr>";
        }
        if ($count > 0) {
          $name = $myrow["name"];
          echo '<tr><td colspan="14"><input type="hidden" name="id-' . $i . '" value="' . $id . '" />';
          echo '<input type="hidden" name="name-' . $i . '" value="' . $name . '" />';
          echo '<input type="hidden" name="team-' . $i . '" value="' . $team . '" />';
          echo '<input type="hidden" name="gameid-' . $i . '" value="' . $gameid . '" /></td></tr>';
          echo "<tr><td>$name</td>";
          echo '<td><select name="battingorder-' . $i . '">';
            echo "<option value='' selected></option>";
          for ($n = 1; $n <= 17; $n++){
            echo "<option value='$n'>$n</option>";
          }
          echo "</select></td>";
          foreach ($cols as $col) {
            echo '<td><input type="text" name="' . $col . '-' . $i . '" align="top" maxlength="2" size="2" /></td>'; }
          echo "</tr>";
          $i++;
          $teamck = $team;
        }
      }    
      echo "<tr><td colspan='14'><input type='submit' name='submit' value='Submit'></td></tr><br /><br />";
      echo "</table></form>";
?>

 

Try it like I just posted with the option tag fixed. I do not know why you had <br /> in there, but it was not necessary and could of been screwing it up also.

 

The only other thing I could think of that is happening is there is too much data being passed back to the php script, which may be the issue. Unsure. Anyhow give that a try and see what happens.

unfortunately, i think i've stumped everyone.

 

i created a form for one team instead of two teams to see if maybe too much data was causing the problem. indeed, a form for one team worked...except when a team's roster hits 19 people...then it stopped working again. so it does appear to be a limitation of how much data can be passed. does anyone know anything about this? there has to be a way around this b/c i'm sure others are submitting lots more data at a time than i am...

 

 

post_max_size  integer

 

    Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize.

 

    If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size.

 

    When an integer is used, the value is measured in bytes. You may also use shorthand notation as described in this FAQ.

 

    If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. This can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e. <form action="edit.php?processed=1">, and then checking if $_GET['processed'] is set.

 

try using www.php.net/ini_set to set the post_max_size to be like 4 MB's and that should take care of it. Hopefully your server allows the ini_set directive.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.