data-method="post" - not working proper on PHP
See original GitHub issueBootstraptable version(s) affected: v1.18.3
Description
when using the attribute
data-method="post"
the browser show it as POST
but PHP v7.4 replies an empty array
Example
<table
id="table"
data-toggle="table"
data-search="true"
data-method="post"
data-url="entities/countryHelper.php"
data-side-pagination="server"
data-pagination="true">
<thead>
<tr>
<th data-field="title">ID</th>
<th data-field="code">Item Name</th>
<th data-field="flag">Item Price</th>
</tr>
</thead>
</table>
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
PHP $_POST not working? [duplicate] - Stack Overflow
Make sure that the "action" attribute on your form leads to the correct destination. Try using $_REQUEST[] instead of $_POST, see if there...
Read more >$_POST - Manual - PHP
If you want to receive application/json post data in your script you can not use $_POST. $_POST does only handle form data. Read...
Read more >PHP POST Method: Understand the Best Method With An ...
In the PHP POST method, data from HTML FORM is submitted/collected using a super global variable $_POST. This method sends the encoded ...
Read more >PHP - GET & POST Methods - Tutorialspoint
The POST method does not have any restriction on data size to be sent. The POST method can be used to send ASCII...
Read more >why form post not working [SOLVED] - php - Daniweb
hi Dear, in form tag action is missing so put <form method="POST" action="index.php">. hope it works for you.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@UtechtDustin https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/
I think this issue can be closed.
You need to set the
contentType
option: https://examples.bootstrap-table.com/index.html#options/content-type.html