android - How to connect Firebase database to Php scripts? -
i making android app firebase database, , stuck @ point when want connect firebase database own hosted php scripts in want perform action on specific date , on date should delete data firebase. firebase data on schedule(on specific date) stuck @ how perform how can make connection firebase database php.
using connection of php, want made connection firebase db , want retrieve , delete data firebase db.
<?php define('host','localhost'); define('username', 'root'); define('password',''); define('db','insert2'); $con = mysqli_connect(host,username,password,db); $username = $_post['username']; $password = $_post['password']; $sql = "insert users (username, password) values ('$username','$password')"; if(mysqli_query($con, $sql)){ echo 'success'; } ?>
please guide me.
you can't connect firebase database same way mysql.
you need use 1 of these lib :
or use rest api.
or create firebase cloud function delete wanted data , call php http trigger.
Comments
Post a Comment