C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Connecting MySQL database through PHP


Posted Date: 13 Aug 2008    Resource Type: Articles    Category: Databases

Posted By: Amol Nirmala Waman       Member Level: Bronze
Rating:     Points: 10



Connecting MySQL5 database through PHP5 is very simple and clean.

1. Create a database with name 'test'
2. Create 'books' table in 'test' database
3. Add three columns 'authorid', 'title', 'author'
4. Create a simple 'demo.php' file
5. Add the following code in 'demo.php'



$hostname = "localhost";
$username = "username";
$password = "password"
$database = "test";

$db_connect = mysql_connect("localhost","username","password");
if (!$db_connect)
{
die(mysql_error());
}

?>




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Web  .  SQL Database to php  .  SQL Database  .  PHP  .  MySQL  .  Database  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Joins in SQL server
Previous Resource: Date and Time data types in SQL Server 2008
Return to Discussion Resource Index
Post New Resource
Category: Databases


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

it outsourcing

Contact Us    Privacy Policy    Terms Of Use