Having trouble connecting to my Azure Database for MySQL. Here is my PHP code:
class access {
var $user = "##";
var $pass = "##";
var $conn = null;
var $result = null;
var $StudentID = null;
var $sql = null;
public function connect() {
$this->conn = new mysqli( host: 'autosign.database.windows.net', username: '##', passwd: '##', dbname: 'Automat');
if (mysqli_connect_error()){
echo 'Could not connect to database';
} else {
echo 'Connected and Selected';
}
}
}
I am using XAMMP to run the PHP scripts. I am using a template app and therefore cannot use a default Azure app connect, and I have been unsuccessful in using the downloadable Azure framework.