Location: PHPKode > scripts > PHP Online Invoice System > php-online-invoice-system/inc/dbconnect.php
<?
/*
 * Exemplar Web hosting
 * http://www.exemplar.biz
 *
 * Title: PHP Online Invoice System
 * Version: 2.0
 * Author: Exemplar
 * Date: 01-01-2006
 *
*/
include("inc/config.php");

$db = mysql_connect("$hostname", "$user","$pass");
mysql_select_db("$database",$db);

$tbl="acctrecv";

function mysql_is_table($hostname, $user, $pass, $database, $tbl)
{
    $tables = array();
    $link = @mysql_connect($hostname, $user, $pass);
    @mysql_select_db($database);
    $q = @mysql_query("SHOW TABLES");
    while ($r = @mysql_fetch_array($q)) { $tables[] = $r[0]; }
    @mysql_free_result($q);
    @mysql_close($link);
    if (in_array($tbl, $tables)) { return TRUE; }
    else { return FALSE; }
} 

?>
Return current item: PHP Online Invoice System