On lines 37-64, you cannot have $DetailsRow
because you have NOT queried the db. It looks like what you need is the data that was just POSTed. So change $DetailsRow
to $_POST
FreddieBambino commented: Very helpful comment he made to me about Javascript +1