Skip to content
Advertisement

pass the tablename to getData.php in flutter

I am making a flutter application using MySQL. In the home page I have a listview as shown below. The database has unique tables for each item in the list view.

What I want is that when I am calling http.get to get all the data from a particular table as per the query mentioned in getData.php, there must also be a procedure to send that table name to that php file so that the query should be completed.

This is getData.php:

JavaScript

and here is the code which I have written to fetch the data. What can I write to send the tablename to getData.php:

JavaScript

Advertisement

Answer

Use post instead of get for your http call;

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement