Jump to content

Janna

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Janna's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks!  :-[ I am sure you can tell that I am a noob to php. - I was actually wondering why the code didn't show up in color in the forum. I am surprised though that php doesn't give any warning about including crap/ Thanks again, Janna
  2. Hi, Here is my problem. I have a file called golobals.php that has the following function in it. [code] <php? //connecting to database function dbconnect($host, $user, $passwd, $database) { $link = mysql_connect($host, $user, $passwd);   if ( !$link ) die("Couldn't connect to MYSQL: ".mysql_error());   mysql_select_db($database, $link) or die("Couldn't open database".mysql_error());   return $link; } ?> [/code] In my script I have the following lines [code] <?php session_start(); include_once("globals.php"); ... $DB = dbconnect($db_hostname, $db_username, $db_password, $db_database); ... [/code] The error I get is that the function dbconnect is undefined. I have tried to use require function instead but it gives the same result (no errors about failed require). Do I have a problem with the path? (I use 1and1 if it matters) Janna
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.