hackalive Posted April 9, 2010 Share Posted April 9, 2010 I am building a mini CMS so I need a quick and easy way to code a mass update to a table for content entered into a form any ideas? thanks in advance Quote Link to comment Share on other sites More sharing options...
taquitosensei Posted April 9, 2010 Share Posted April 9, 2010 mass update? As in many rows with the same informatio? Many rows with different information? More info is needed. Quote Link to comment Share on other sites More sharing options...
hackalive Posted April 9, 2010 Author Share Posted April 9, 2010 could do with a way that made all values from $_POST into an array and all data from between the [] in relation to the $_POST (eg $_POST['name']) into another, then split them and $POST[0] and $VALUE[0] are relational that is $_POST['name'] (becomes $POST[0] = name) and the value form that is put into the $VALUE array as $VALUE[0] now just how to do it? PS the rows are identified by the info between the [] so name is in the tag column the name field id | tag | value 0 | name | mine name is an example only! Quote Link to comment Share on other sites More sharing options...
ignace Posted April 9, 2010 Share Posted April 9, 2010 array_keys -- gives you the array keys (name, ..) array_values -- gives you the array values Quote Link to comment Share on other sites More sharing options...
hackalive Posted April 9, 2010 Author Share Posted April 9, 2010 foreach ($_POST as $tag => $value) { Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.