where to put includes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JRough

    #1

    where to put includes

    I have this at the top of the file

    include './includes/config.inc.php' ;
    include $include_path.' dates.inc.php';
    include $include_path.' auction_types.i nc.php';
    include $include_path.' countries.inc.p hp';
    include $include_path.' datacheck.inc.p hp';
    include $include_path.' wordfilter.inc. php';
    include $include_path.' converter.inc.p hp';

    I have some other includes inline with mysql queries:

    include "header.php ";

    $_SESSION["sessionVar s"]=$sessionVars;
    include "header.php ";
    include phpa_include("t emplate_menu_ph p.html");
    include phpa_include("t emplate_sell_pr eview_php.html" );
    include "footer.php ";
    exit;
    }


    $query = "SELECT * FROM PHPAUCTIONXL_in vitedbuyersrows WHERE list_id=
    $v";
    $resi = @mysql_query($q uery);
    if(!$resi) {
    MySQLError($que ry);
    exit;
    } else {
    while($user = mysql_fetch_arr ay($resi)) {
    $query = "SELECT name,email FROM PHPAUCTIONXL_us ers WHERE id='".
    $user["buyer_id"]."'";
    //print $query."<br />";
    $resu = @mysql_query($q uery);
    if(!$resu) {
    mySQLError($que ry);
    exit;
    } elseif(mysql_nu m_rows($resu) 0) {
    $BUYER_EMAIL = mysql_result($r esu,0,"email");
    $BUYER_NAME = mysql_result($r esu,0,"name");
    include $include_path." invitation_emai l.inc.php";
    }
    }
    }
    }
    }

    What I want to know is how to organize it. I don't have a template
    and I don't know what one is. How can I take all the includes out and
    put it on one page? Is that what this directory is for. How can you
    know which includes need to be in the directory and which includes
    must be in-line?:


    include './includes/config.inc.php' ;

    Thanks,
Working...