I have a jQuery function that allows the user to create a list of links. By clicking on the “add line” link, they create as many of these blocks (shown below) as they like, into which they can enter information.
<div class="links_row">
<input type="text" name="link_name[]">
<input type="text" name="link_url[]">
</div>
I am sending this data to a PHP function for insertion into a database that looks like this:
+---------------+
|id |
+---------------+
|name |
+---------------+
|url |
+---------------+
I need to figure out how to combine the two input arrays link_name [] and link_url [] and skip the resulting resulting unit array by inserting them as a row into the database.
source
share