Forum Moderators: coopster

Message Too Old, No Replies

included login script (whmautopilot)

Include a login script containing includes into an included

         

russgri

10:24 pm on Sep 28, 2003 (gmt 0)

10+ Year Member



//path=inc/clogin.php
//is a login script include and is a database component

<?PHP
include "inc/var.php";
include $server_inc."/connect.php";
include $server_inc."/client_functions.php";
if (isset($submit))
{
if (auth_un_pw($username, $password)<="0")
{
$err=true;
}
else
....blah blah....
// I want it to show in my top right logo area
//along with a nondatabase component
// inc/logo.php...which is the left portion of the top

</div>
<div id="center">
<div id="header"><img src="../images/logo-mydomain.png" width="500" height="100" alt="" border="0" align="">
</div>

//index.php


<?php
$title ='Mydomain Internet Services';
include($_SERVER["DOCUMENT_ROOT"]."/inc/header2.php");
include($_SERVER["DOCUMENT_ROOT"]."/inc/logo.php"); //needs to contain inc/clogin.php
include($_SERVER["DOCUMENT_ROOT"]."/inc/topnav.php");
include($_SERVER["DOCUMENT_ROOT"]."/inc/leftnav.php");
include($_SERVER["DOCUMENT_ROOT"]."/inc/right.php");
include($_SERVER["DOCUMENT_ROOT"]."/inc/footer.php");
?>
<!-- Body tag is included in above inc files -->
<?php
<div id="content" class="whm">
<!-- Plans and packages in leftnav and generally similar to imagelink layout -->
</div>
?>
<?php
include($_SERVER["DOCUMENT_ROOT"]."/inc/footer.php");
?>
</body>
</html>

Question:
index.php needs to contain the login area files above and needs to contain the database component 'inc/clogin.php as well as the logo image. How?
Can I nest these include templates or do I need to append them a part of the Head ...which is itself an include file.
?

coopster

3:57 pm on Sep 29, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You can include [us4.php.net] them either way, if I'm understanding you correctly. If you only need to include a file once though, such as a login script, you might want to use include_once [us4.php.net].