<?php
$db = 'user';
$user = '';
$pass = '';
$host = 'localhost';
$jungiames=mysql_connect($host,$user,$pass);
$dbpasirinkimas=mysql_select_db('$db',$jungiames);
if(!$jungiames || !$dbpasirinkimas){
echo"nepavyko prisijungti prie duomenu bazes";exit;
}else{
echo"Pavyko prisijungti prie duomenu bazes";
}