I am having problems with my php includes and I am wondering if someone can tell what could be wrong with my code. This is how my file set is broken down.
I have two index files. one in bank\index.php and one in bank\onlinebanking\index.php.
I have split my header and footer in two different files. They are listed as bank\header.inc.php and bank\footer.inc.php. I capture my css from my header for the entire website.
header includes:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Banking Home Page</title>
</head>
<body class="body">
<link href="../_assets/stylesheets/style.css" rel="stylesheet" type="text/css" />
<div>
<table border="0" width="100%" cellspacing="0" cellpadding="0" background="_assets/images/bkrnd_top.png">
<tr>
<td width="50%"><img border="0" src="../_assets/images/bkgrnd_tl.png" width="205" height="61"></td>
<td width="50%">
<p align="right"><img border="0" src="../_assets/images/logo.png" width="160" height="61"></td>
</tr>
</table>
</div>
<div>
<table border="0" width="100%" cellspacing="1" cellpadding="0" background="_assets/images/background_headerarea.png">
<tr>
<td width="100%"><font face="Arial" size="2"><b> <font color="#FFFFFF">HOME | TBA | TBA | TBA | TBA | TBA</font></b></font></td>
<td>
</tr>
</table>
<?php require_once('login.inc.php'); ?>
The problem I am having I cannot get my css or my _assets to render correctly for both of my inex files.
If I change the link to something like src="../_assets/images/bkgrnd_tl.png" it will display correctly in bank\onlinebanking\index.php but it will not display in bank\index.php. If I change the link to src="_assets/images/bkgrnd_tl.png" it will display in bank\index.php and not in bank\onlinebanking\index.php.
I hope you get the idea what I trying to say. I would like just one header and footer for all the css to render on all pages.
My includes are as such:
bank\onlinebanking\index.php =
require_once('../websiteconfig.inc.php'); require_once('../header.inc.php'); ?>
bank\index.php