lundi 20 juillet 2015

Get JSON variable into webpage

I have started to learn JSON with PHP. First I wan't to learn, how to create some easy API which get some data from database from main server and use it in other webpage. I have found some solutins which get these data into web browser consule and not just specific data I need for that web but all data from database.

For example:

DATABASE

id: 1 name: test status: active

id: 2 name: test2 status: disable

INTO TEST.COM WEB

It get just record whos name is TEST and use its status.

$status = RECORD FROM DATABASE; if($status = 'disable'){echo 'THIS WEBPAGE STATUS IS DISABLE';}else{echp 'THIS WEBPAGE STATUS IS ACTIVE';}

Could some one help me with this, please? It looks very east from what I have seen, but just not for me, because I am new with this JSON.

Thanks a lot




Aucun commentaire:

Enregistrer un commentaire