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" <table width = 600 valign = top>";
//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 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" <table width = 600 valign = top>";
//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