[Fivem to PHP | HELP]

,

Hello! I am trying to send data to php. This is my code and I cant find what the problem is!

LUA:

PHP
image

What prints:
image

Your POST data is not form encoded but raw json thus PHP does not pick it up in $_POST, instead use

echo file_get_contents("php://input")

Just to do a sanity check here, your PHP file is running on something like XAMPP right, not inside your FiveM resource?

Yes, im running it on XAMPP.

1 Like