Sending Html Table Data Into Mysql Table January 27, 2023 Post a Comment I have a dynamic (via jquery) html table like this: ,'Selection1','Selection2', ..... ] url = './index.php'; $('table').find('tr:gt(0)').each(function( i, row ) { var oRow = {}; $( row ).find( 'td' ).each( function( j, cell ) { oRow[ keys[ j ] ] = $( cell ).text(); }); myData.push( oRow ); }); //myData = [ {"ID":"3u3y","Selection1",....},{"ID":"jdjdj",...}.... ] //now you can use one key to send all the data to your server $.post( url, { mydata: JSON.stringify( myData ) }, function(d) { alert( 'Server said, ' + d ); }); //In your PHP script you would look for the data in mydata --> $_POST['mydata'] Copy EDIT Click the link below to go to a demo. In THIS DEMO click submit and then look at the console on the right. Click the plus on the left of the failed ajax call and then click the Post tab to examine the data the call attempted to send. Does that help? Share You may like these postsPhp Forms Submission With Blank Answers Removed - Stop Body Message From Submitting If Field Is BlankIs There A Way To Designate Multiple Image Sources In Html/javascript?Radio Button Show Hover Between Two Radio Button Using JqueryWhat Is The Browser Support For The Media Attribute On A Link Tag With Css Queries (like Orientation)? Post a Comment for "Sending Html Table Data Into Mysql Table"