Answers for "flutter connect to mysql server"

SQL
2

flutter mysql

void post() async {
    var result = await http.post(
        "http://{your url}/index.php",
         body: {
           "value": "Test DB Connection"
         }
    );
    print(result.body);
}
Posted by: Guest on April-28-2021
0

flutter connect to mysql server

<?php
$dns = ‘mysql:host=localhost;dbname=enter-database-name’;
$user = ‘enter-username’;
$password = ‘enter_the_password_of_your_database’;
try{
 $db = new PDO ($dns, $user, $pass);
}catch( PDOException $e){
 $error = $e->getMessage();
 echo $error;
}
Posted by: Guest on October-13-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language