This content has been marked as final. Show 6 replies
Here's what I did:
First, I put all of the content into a String, comma separated, named 'count'. I then used the following in php to spit the text on each comma to put the content into an array:
$count = mysql_real_escape_string($_GET["count"]);
$count = split(',', $count);
better to use xml or json format
I suggest XML is the best format for your array.
I submit complete recordsets to PHP in a single POST as XML - then use simpleXML() in PHP to parse the records and fields to construct the SQL insert / update statements.
This very efficient and flexible as long as your XML data model mimics the mySQL data model. Then any XML you submit will parse correctly and map to appropriate table columns with just one generic PHP script.
I appreciate the comments supporting the use of xml or json, but what could be simpler than the solution I used-- not trying to be aggressive, just wondering what are the benefits?
I think you can send your data like
this way with paramname and value as a string.
in php section you just explit it with , and you will get all params with value