Associate
- Joined
- 19 Mar 2005
- Posts
- 569
Got a slight problem in that my php form wont submit all values. My query works fully and submits values until I put the score2H and score2A in which are both named correctly. score1H and score2A contain the same range of values as score2H and score1H. I then removed score2H and score2A from the query and all the other values were submitted. Just wondering if anyone could help me with this I have been trying for hours to fix this and cant find a fix.
My insert query which worked until i inserted score2H and score2A.
score2H and score2A
My insert query which worked until i inserted score2H and score2A.
Code:
$result = mysql_query( "INSERT INTO teamMatches (
matchID,
date,
division,
homeAway,
teamHName,
teamAName,
player1H,
player1A,
score1H,
score1A,
pWL1_H,
player2H,
player2A,
score2H,
score2A)
VALUES (
NULL,
'".$_POST['date']."',
'".$_POST['division']."',
'".$_POST['homeAway']."',
'".$_POST['teamHName']."',
'".$_POST['teamAName']."',
'".$_POST['player1H']."',
'".$_POST['player1A']."',
'".$_POST['score1H']."',
'".$_POST['score1A']."',
'$pWL1_H',
'".$_POST['player2H']."',
'".$_POST['player2A']."'
'".$_POST['score2H']."'
'".$_POST['score2A']."')");
score2H and score2A
Code:
<td><select name="score2H" class="field" id="score2H">
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
<option value="0">0</option>
</select></td>
<td><select name="score2A" class="field" id="score2A">
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
<option value="0">0</option>
</select></td>
Code:
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">