Monday, September 6, 2010

Connecting to MySQL Database in PHP

<?php

    $dbname="{database name}";
    $cn=mysql_connect('{host}','{username}','{password}') or 
    die("I Couldn't connect");
    $db=mysql_select_db($dbname,$cn) or die("I Couldn't select your database");
    $app_table1="{table name}";

?> 

No comments:

Post a Comment