I'm trying to send a request to a sever and have it echo the data. So far, it's turned out pretty well. That is until I tried to send a table to it and index it. Basically, I have this roblox code:
local http=game.HttpService
print(http:PostAsync("http://localhost/whitelist/index.php",http:JSONEncode({"username","password"})))
and here's my PHP code:
echo file_get_contents("php://input")[1];
As you can see, I'm trying to echo the first index in the table given. However, when I try to do this it just echos ' " '. I'm guessing that's because it's the second character in the table, because when I try to index the second one it does ' u '. With this being said, does anyone know how to send the table to the host and have it echo a certain index?
Thank you so much.

1 comment
This isn't a PHP help site. Google how to parse JSON in PHP.