| Current Path : /home/www/khana.org.af/server/ |
| Current File : /home/www/khana.org.af/server/conn.php |
<?php
$servername = "localhost";
$username = "khana_ei";
$password = "sarf@khana1122";
try {
$conn = new PDO("mysql:host=$servername;dbname=khana_ei", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$conn->exec("set names utf8mb4");
}
catch(PDOException $e){
echo "Connection failed: " . $e->getMessage();
}
?>