$host = 'localhost';
$database = 'user';
$user = 'root';
$pass = '';
$dsn = "mysql:host=$host;dbname=$database;";
$options = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
);
$pdo = new PDO($dsn, $user, $pass, $options);
$sql = $pdo->prepare("SELECT id FROM `use`");
$data = $sql->fetch();
var_dump($data['login']);