Posted by: roobon on: জুলাই 26, 2007
You have created a database in mysql. When you will make a php page then you have to make connection with it. Here is the code will help you to connect with your database. You can put it in every page in your project or put in a file and include it from other page.
<?php
// mysql connection
$conn = mysql_connect(“server”, “user”, “password”) or die(mysql_error); //local pc configuration (“localhost”, “root”, “”)
//echo “connected to mysql”;
// Database connection
$db = mysql_select_db(“databasename”, $conn); // databasename: test or address_book e.g
if (!$db)
echo “database not Selected”;
?>
সাম্প্রতিক মন্তব্যসমূহ