<?php
$DB_DATABASE = "";
$prefix = "iitech_";

if(isset($_POST['database'])){
	$DB_DATABASE = $prefix.$_POST['database'];
}

// include db connect class
require_once __DIR__ . '/include/new_db_connect.php';

// connecting to db
$bdd = connect($DB_DATABASE);

$idphone = 1;

try{
	$sql  = 'select phone_number  from configphone where id = :idphone';
	$statement = $bdd->prepare($sql);
	$statement->bindParam(':idphone', 		$idphone, 		PDO::PARAM_STR);
	$statement->execute();
	$tab=$statement->fetch(PDO::FETCH_ASSOC);
	$phone_number = $tab['phone_number'];
	$json['phone_number'] = $phone_number;
	echo json_encode($json);	
}catch(PDOException  $e ){
	echo $e->getMessage( );
}
?>