PHP Form Not Submitting All Values

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.
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">
 
The page is here

Not getting no error message its just not submitting values when I enter score2H and score2A to the query. Just reading escaped queries now

My full query is
Code:
$result = mysql_query( "INSERT INTO teamMatches (
							matchID,
							date,
							division,
							homeAway,
							teamHName,
							teamAName,
							player1H,
							player1A,
							score1H,
							score1A,
							pWL1_H,
							player2H,
							player2A,
							score2H,
							score2A,
							pWL2_H,
							player3H,
							player3A,
							score3H,
							score3A,
							pWL3_H,   
							player4H,
							player4A,
							score4H,
							score4A
							pWL4_H,
							player5H,
							player5A,
							score5H
							score5A
							pWL5_H,
							teamHResult,
							teamAResult,
							teamHTotal,
							teamATotal,
							comments)
							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']."',
			  '$pWL2_H',
			  '".$_POST['player3H']."',
			  '".$_POST['player3A']."',
			  '".$_POST['score3H']."',
			  '".$_POST['score3A']."',
			  '$pWL3_H',
			  '".$_POST['player4H']."',
			  '".$_POST['player4A']."',
			  '".$_POST['score4H']."',
			  '".$_POST['score4A']."',
			  '$pWL4_H',
			  '".$_POST['player5H']."',
			  '".$_POST['player5A']."',
			  '".$_POST['score5H']."',
			  '".$_POST['score5A']."',
			  '$pWL5_H',
			  '".$_POST['teamHResult']."',
			  '".$_POST['teamAResult']."',
			  '".$_POST['teamHTotal']."',
			  '".$_POST['teamATotal']."',
			  '".$_POST['comments']."')");
 
Back
Top Bottom