Tag Archives: Database server

use php process a web form feedback–continue

since you got a form collect your information , so now you need create a database

here it is , you could save this as inc_connect.php

<?php
$db_name = “chinese_zodiac_database”;
$DBConnect = mysql_connect(“severname”,”usename”,”password”);
if (!$DBConnect)
{
echo “<p>unable to connect to the database server “.mysql_error().”</p>”;
}
else
{
$db = mysql_select_db($db_name);
if(!$db)
{
echo “<p>unable to connect to the database server “.mysql_error().”</p>”;
mysql_close();
$DBConnect = false;
}

}

?>