Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection error

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
Hi All,

I have a conn.php page like this:
$username = "Bastien";
$pwd = "sweden";
$host = "localhost";
$dbname = "Gulfstream";

if (!($conn=mysql_connect($host, $username, $pwd))) {
printf("error connecting to DB by user = $username and pwd=$pwd");
exit;
}
$db=mysql_select_db($dbname,$conn) or die("Unable to connect to database1");

then I have a prod.php which takes a variable in a querystring and tries to hit the DB where I get this:

Fatal error: Failed opening required 'dbconng' (include_path='') in C:\Inetpub\ on line 9

yet in the file, it looks like this:
require("commonmn.php");


//header logo
$msg1 = "";
HTMLHeader(); //function to print header
require("dbconng"); //is on line 9
$SQLProd = "select * from gulf_products where prod_name = $prod";

$SQLResult = mysql_query($SQLProd, $conn) or die ("Couldn't execute query1");
echo&quot; <table width = 600 valign = top>&quot;;
//pass the info to the screen
$row = mysql_fetch_array($SQLProdGet);

Any ideas??

TIA



Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
I checked the mySQL error file in the WinMySQLAdmin and get this error

Aborted connection 4 to db: 'unconnected' user: 'Bastien'
host: 'localhost'

This was working for the last few days and has now crapped out on me

any help would be wonderful

TAI Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top