I have includes at the top of the file and I have inline includes also
includes in mysql queries. For example:
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';
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. Is that what this directory is for:
include './includes/config.inc.php' ;
How do I
know which includes need to be in the directory and which includes
must be in-line?:
Also, I read that require() is better than include(). Should I change
all includes to require?
Thanks,