Hi there guys,
I wanted a way to exclude the db connection from my config file for portions of my install script, so I placed the following in my install:
$no_db == '1';
echo("db name is: $no_db");
which doesn't echo the value(I also tried without the single quote on the value)
And I placed the following in my config file at the db connection:
if(isset($no_db){
}else{
$autoconn = mysql_connect("$dhost","$dusername","$dpwd") or die ("DBUser or DBPass was refused when attempting to connect to MySQL Host.");
$dbi=mysql_select_db($dbname,$autoconn) or die("Unable to make master connection to database from the config file!" . mysql_error());
}
Which gives me the following error:
Parse error: parse error, unexpected '{' in /usr/local/psa/home/vhosts/schwim.net/httpdocs/automonial/config.php on line 50
Line 50 is:
if(isset($no_db){
If I'm right, I have two problems. One is that $no_db is not getting set. The other is the fact that I'm getting an error on the config file, because if that value isn't set, it's supposed to do it's db thang. I am including the config.php AFTER I've set the value for $no_db 😃
Can anyone tell me where I went astray?
thanks,
json