Using ajax and $.POST not sending data to php
<p>Orginally I tried storing everything I wanted to send as variables, then inputting them in to the $.post . But it saying variables were undefined, so I made it a lot simpler by just doing this</p>

<pre><code>$.post("uploadData.php", {
  match : document.getElementById("matchNumInput").value,
  team : document.getElementById("teamNumberInput").value,
  highMade : parseInt(document.getElementById("himd").textContent),
  highAttempt : parseInt(document.getElementById("hiat").textContent),
  lowMade : parseInt(document.getElementById("lomd").textContent),
  lowAttempt : parseInt(document.getElementById("loat").textContent),
  fouls : parseInt(document.getElementById("foulCounter").textContent),
  blocks : parseInt(document.getElementById("blockCounter").textContent), 
  picks : parseInt(document.getElementById("pickCounter").textContent),
  hang : parseFloat(document.getElementById("timer").textContent),
  comment : document.getElementById("commentsInput").value,
  obstacle1 : document.getElementById("obstacleOneCounter").textContent,
  obstacle2 : document.getElementById("obstacleTwoCounter").textContent,
  obstacle3 : document.getElementById("obstacleThreeCounter").textContent, 
  obstacle4 : document.getElementById("obstacleFourCounter").textContent,
  obstacle5 : document.getElementById("obstacleFiveCounter").textContent,
  obstacle6 : document.getElementById("obstacleSixCounter").textContent,
  obstacle7 : document.getElementById("obstacleSevenCounter").textContent,
  obstacle8 : document.getElementById("obstacleEightCounter").textContent,
  obstacle9 : document.getElementById("obstacleNineCounter").textContent,
  autoHighMade : parseInt(document.getElementById("ahimd").textContent),
  autoHighAttempt : parseInt(document.getElementById("ahiat").textContent),
  autoLowMade : parseInt(document.getElementById("alomd").textContent),
  autoLowAttempt : parseInt(document.getElementById("aloat").textContent),
  autoObstacle1 : document.getElementById("autoObstacleOneCounter").textContent,
  autoObstacle2 : document.getElementById("obstacleTwoCounter").textContent,
  autoObstacle3 : document.getElementById("autoObstacleThreeCounter").textContent,
  autoObstacle4 : document.getElementById("autoObstacleFourCounter").textContent,
  autoObstacle5 : document.getElementById("autoObstaclefiveCounter").textContent,
  autoObstacle6 : document.getElementById("autoObstacleSixCounter").textContent,
  autoObstacle7 : document.getElementById("autoObstacleSevenCounter").textContent,
  autoObstacle8 : document.getElementById("autoObstacleEightCounter").textContent,
  autoObstacle9 : document.getElementById("autoObstacleNineCounter").textContent
});
</code></pre>

<p>Yeah, it is a lot. But it isn't getting sent to the php file. Is my syntax wrong?Should I not be sending so much in one post?</p>

<p>EDIT: the php is here:</p>

<pre><code>    &lt;?php 
$match = $_POST["match"];
$team = $_POST["team"];
$highMade = $_POST["highMade"];
$highAttempt = $_POST["highAttempt"];
$lowMade = $_POST["lowMade"]; 
$lowAttempt = $_POST["lowAttempt"];
$fouls = $_POST["fouls"];
$blocks = $_POST["blocks"]; 
$picks = $_POST["picks"];
$hang = $_POST["hang"]; 
$comment = $_POST["comment"];
$obstacle1 = $_POST["obstacle1"];
$obstacle2 = $_POST["obstacle2"]; 
$obstacle3 = $_POST["obstacle3"];
$obstacle4 = $_POST["obstacle4"]; 
$obstacle5 = $_POST["obstacle5"]; 
$obstacle6 = $_POST["obstacle6"]; 
$obstacle7 = $_POST["obstacle7"]; 
$obstacle8 = $_POST["obstacle8"]; 
$obstacle9 = $_POST["obstacle9"]; 
$autoHighMade = $_POST["autoHighMade"]; 
$autoHighAttempt = $_POST["autoHighAttempt"];
$autoLowMade = $_POST["autoLowMade"]; 
$autoLowAttempt = $_POST["autoLowAttempt"];
$autoObstacle1 = $_POST["autoObstacle1"]; 
$autoObstacle2 = $_POST["autoObstacle2"]; 
$autoObstacle3 = $_POST["autoObstacle3"]; 
$autoObstacle4 = $_POST["autoObstacle4"]; 
$autoObstacle5 = $_POST["autoObstacle5"];
$autoObstacle6 = $_POST["autoObstacle6"];
$autoObstacle7 = $_POST["autoObstacle7"];
$autoObstacle8 = $_POST["autoObstacle8"];
$autoObstacle9 = $_POST["autoObstacle9"];

$servername = "localhost";
$username = "u255789499_me";
$password = "mydongishuge";
$dbname = "u255789499_match";

$connect = mysqli($servername,$username,$password,$dbname);

if ($connect-&gt;connect_error) {
    die("Connection failed: " . $connect-&gt;connect_error);
} 

$sql = "INSERT INTO scoutData (team, match, highMade, highAttempt, lowMade, lowAttempt, fouls, blocks, picks, hang, comments, obstacle1, obstacle2, obstacle3, obstacle4, obstacle5, obstacle6, obstacle7, obstacle8, obstacle9, autoHighMade, autoHighAttempt autoLowMade, autoLowAttempt, autoObstacle1, autoObstacle2, autoObstacle3, autoObstacle4, autoObstacle5, autoObstacle6, autoObstacle7, autoObstacle8, autoObstacle9) VALUES('$match','$team','$highMade','$highAttempt','$lowMade','$lowAttempt','$fouls','$blocks','$picks','$hang','$comment','$obstacle1','$obstacle2','$obstacle3','$obstacle4','$obstacle5','$obstacle6','$obstacle7','$obstacle8','$obstacle8','$obstacle9','$autoHighMade','$autoHighAttempt','$autoLowMade','$autoHighAttempt','$autoObstacle1','$autoObstacle2','$autoObstacle3','$autoObstacle4','$autoObstacle5','$autoObstacle6','$autoObstacle7','$autoObstacle8','$autoObstacle9')";

mysql_query($sql);

?&gt;
</code></pre>

<p>I don't think there is anything wrong with it. But I've been wrong before (constantly actually)</p>