How to Fetch Dynamic input field array items value with different name php mysql? -


i have form below:

<form id="bookform" method="post" class="form-horizontal"> <div class="form-group">     <label class="col-xs-1 control-label">book</label>     <div class="col-xs-4">         <input type="text" class="form-control" name="book[0].title" placeholder="title" />     </div>     <div class="col-xs-4">         <input type="text" class="form-control" name="book[0].isbn" placeholder="isbn" />     </div>     <div class="col-xs-2">         <input type="text" class="form-control" name="book[0].price" placeholder="price" />     </div>     <div class="col-xs-1">         <button type="button" class="btn btn-default addbutton"><i class="fa fa-plus"></i></button>     </div> </div> 

how value of form in php $_post because name of fields <br/>name="book[0].title"**<br/>?

and there many dynamic different name input fields.

if want use same form change name of textbox like,

    <form id="bookform" method="post" class="form-horizontal"> <div class="form-group">     <label class="col-xs-1 control-label">book</label>     <div class="col-xs-4">         <input type="text" class="form-control" name="book[0][title]" placeholder="title" />     </div>     <div class="col-xs-4">         <input type="text" class="form-control" name="book[0][isbn]." placeholder="isbn" />     </div>     <div class="col-xs-2">         <input type="text" class="form-control" name="book[0][price]" placeholder="price" />     </div>     <div class="col-xs-1">         <button type="submit" class="btn btn-default addbutton"><i class="fa fa-plus"></i></button>     </div> </div> 

and value of form echo $_post['book'][0]['title'];

i hope can you.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -