I'm creating an Android App that needs to connect to a remote Db. So i'm using Json and a PHP page. For testing, i've installed EasyPhp. This is the script that i made for test.
I've added the local address in the config of apache.
<?php
$cf = 'prova';
$cognome = 'prova';
$nome = 'prova';
$data = '1993-08-02';
$telefono = 'prova';
$email = 'prova';
$codice = 'aaaaa';
echo($cf);
$conn = mysql_connect('192.168.0.100:3306', 'root', '');
mysql_select_db('voceparkinsondb',$conn);
if (!$conn) {
die('Could not connect: ' . mysql_error());
}
$risultato = mysql_query("INSERT INTO paziente(CF, Cognome, Nome, DataNascita, Telefono, Email, CodiceAttivazione) VALUES ('$cf', '$cognome','$nome','$data', '$telefono', '$email', '$codice')") or die('Errore: ' .mysql_error());
?>
and this is the error that i've recived
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\scripts\AddRecord.php on line 14
Warning: mysql_connect(): Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione. in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\scripts\AddRecord.php on line 14
Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\scripts\AddRecord.php on line 15
Could not connect: Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione.
Where's the problem? Thanks