Results 1 to 3 of 3
  1. #1

    config file not working properly

    Hi, the following code isnt calling $sql_tbl_prefix = "site_"; from the config file properly.

    PHP Code:
    <?
    include("config_global.php");
    include(
    "mysql_connect.php");
    //==========
    function unconfirmed() {
    $result mysql_query("SELECT * FROM ".$sql_tbl_prefix."newsletter");
    if (!
    $result) { echo("MySQL Error: ".mysql_error()); }
    echo 
    "Unconfirmed:<br /><br />";
    while ( 
    $row mysql_fetch_array($result) ) {
    echo 
    "Blah Blah...";
    }
    echo 
    "These are unconfirmed users";
    }
    ?>
    This returns an error saying it cannot find the "newsletter" table but it should be "site_newsletter".

    For some reason its not reading $sql_tbl_prefix in the config file, but it is reading what database it should use.

    All help is appreciated!

    Thanks in advance,
    Matt
    http://www.theextremenetwork.com
    MSN: [email protected]

  2. #2
    after this line:
    Code:
    function unconfirmed() {
    add this line:
    Code:
    global $sql_tbl_prefix;

  3. #3
    Thanks CyberAlien, Much Appreciated!
    http://www.theextremenetwork.com
    MSN: [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •