|
Post by hoanglenin on Dec 17, 2021 4:28:32 GMT
my lua scrypt:
info = {Device_ID = "123456", Email = "abcde@gmail.com"}
httpPost("link to php", info)
my code PHP:
<?php $conn = new mysqli("localhost", "id18086435_admin", "Hoanglenin-123456","id18086435_modsw"); if($conn->connect_error != null){ die($conn->connect_error); } $JDecode = json_decode(file_get_contents('php://input'),true); $ID = $JDecode["Device_ID"]; $Email = $JDecode["Email"]; $VIP = "No"; if($conn-> query("INSERT INTO Login (ID, EMAIL, VIP) VALUES (N'$ID', N'$Email', N'$VIP')")){ echo ("print('OK')"); }else{ echo ("print('fail')"); } ?>
the database doesn't add the information I send!
|
|
|
Post by AnkuLua on Dec 17, 2021 5:02:41 GMT
First visit the site with browser and make sure that the php works.
|
|
|
Post by hoanglenin on Dec 18, 2021 6:00:16 GMT
First visit the site with browser and make sure that the php works. exactly! the hole in php i fixed it and it worked fine!
|
|