script this time we are still discussing about the connection to the database .. I previously had mengeshare to make connections now I share how to make in order to connect to the MySQL database we have created through PHPmyadmin.....
Copy this script or any type of initial create_DB.php then saved with the name or whatever you like
survived Coding..happy coding :)
<html>
<head>
<title>
Menggunakan MYSQL create_DB
</title>
</head>
<body>
<?php
$host="localhost";
$user="sandroid";
$pass=" ";
$database="db_guestbook";
$konek="mysql_connect($host, $user, $pass)" or die("koneksi gagal dilakukan:". mysql_error());
if (mysql_create_db($database))
{
echo"Database $database telah dibuat";
}
else {
echo"gagal dalam membuat database".mysql_error();
}
mysql_close($konek);
?>
</body>
</html>
Search
Categories
Archives
-
▼
2011
(11)
-
▼
Desember
(11)
- Lyrik Yellow Card_Only One
- HTML Script in PHP
- Exercise Creating Functions for PHP
- Create_Database PHP
- Example Script PHP Connect to Database
- Program AVL Tree C++
- Ucapan Tahun Baru Shinen Omodetou Gozaimasu
- Source Code Program Bus Queue C++
- Basic Array Example Program
- sample program Queue
- What's Superskalar..???
-
▼
Desember
(11)