I was going to use jQuery to clone the input field when I click a button to make another field, but I was thinking of doing:
Page One, Page Two, Page Three <- then send that as one $_POST to the server and have it take each page and break on the "," comma then for each insert in to my POSTS table.
Any idea on how I would do that? Would I use explode()? Then inside a foreach() run a query for each item in the field.
So if there were 5 pages typed in separated by commas, it would run five times using the foreach().
for each(){ EXECUTE SQL HERE }
Does that sound like it would be the best way of going about it?
If you set the
nameattribute of theinputelement to the name of an array, e.g.foo[], you’ll be able to access it as such when processing the$_POSTvars, e.g.becomes two iterations of: