Jump to content

nyther

New Members
  • Posts

    1
  • Joined

  • Last visited

nyther's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey guys, I am trying to input data into a mysql database from data thats been added by a jquery form with cloned fields. It is working however it adds the first row correctly then a blank row and then the rest of the rows correctly The code is this $x=0; do { $fga=$_POST['ID'.$x.'fga']; $fgm=$_POST['ID'.$x.'fgm']; $fta=$_POST['ID'.$x.'fta']; $ftm=$_POST['ID'.$x.'ftm']; $tpa=$_POST['ID'.$x.'tpa']; $tpm=$_POST['ID'.$x.'tpm']; $fta=$_POST['ID'.$x.'fta']; $ftm=$_POST['ID'.$x.'ftm']; $stl=$_POST['ID'.$x.'stl']; $trb=$_POST['ID'.$x.'trb']; $ast=$_POST['ID'.$x.'ast']; $blka=$_POST['ID'.$x.'blka']; $blkf=$_POST['ID'.$x.'blkf']; $tovr=$_POST['ID'.$x.'tovr']; mysql_query("INSERT INTO stats (gameId, fga, fgm, tpa, tpm, fta, ftm, ast, stl, trb, blka, blkf, tovr) VALUES ('$gameId', '$fga', '$fgm', '$tpa', '$tpm', '$fta', '$ftm', '$ast', '$stl', '$trb', '$blka', '$blkf', '$tovr')")or die("<div class='errmsg'>Insert Error: ".mysql_error()."</div><br /> \n"); $x++; Can anyone see what ive done wrong? Thanks
×
×
  • 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.