You are currently viewing Selecting a Database  Php

Selecting a Database Php

Spread the love

<?php
$hostaneme = “127.0.0.1”;
$username = “root”;
$password = “root”;
$connection = mysql_connect($hostaneme,$username,$password);
if(!$connection)
{
die (“Sunucusu ile bağlantı kurulamadı!”);
}
$result = mysql_select_db(“test”);
if(!$result)
{
die(“veritabanı seçilmedi”);
}
echo “Veritabanı test kullanıma hazır.”;
?>

Bir yanıt yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.