$data = prepare('SELECT * FROM `users` WHERE `phone`= ?');
$data->execute(array($login));
Fatal error: Call to undefined function prepare()
$var="User";
$dbh=new PDO("mysql:host=localhost;dbname=database;","root","");
$stmt=$dbh->prepare("UPDATE `users` SET user=:var");
$stmt->bindParam(":var",$var);
$stmt->execute();