I have reference on this site to send data to MySQL but I don't know the function of this code $json = file_get_contents('php://input');
I have this jsonArray :
[{"id":"1","nilai":"1"},{"id":"2","nilai":"1"},{"id":"3","nilai":"1"},{"id":"4","nilai":"1"},{"id":"5","nilai":"1"}]
But again, I don't know how to send those json to database, and the tutorial in go*gle is so scrimpy for my issue. so I begging someone to help me.
Question :
- Is it possible to add the
jsonArrayto database in case the String insidejsonis looped?
That's mean is it possible to add/insert those json to database? how to do? and the final maybe like this :
|----|-------|
| ID | Nilai |
|----|-------|
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
|... | ... |
|====|=======|
json_decode(json)but i don't have an idea to create a php script for that,file_get_contents("php://input");, that'sphp://inputis a special character or?