View Single Post
Old 01-19-2003, 04:29 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,487
sde is on a distinguished road
connect.php

PHP Code:
<?
// Login & Session example by sde
// connect.php

// replace with your db info
$hostname="localhost";
$mysql_login="root";
$mysql_password="";
$database="test";

if (!(
$db mysql_connect("$hostname""$mysql_login" "$mysql_password")))
{
  print(
"Can't connect to mysql.");    
}
else
{
  if (!(
mysql_select_db("$database",$db)))
  {
    print(
"Can't connect to db.");
  }
}
?>
sde is online now   Reply With Quote