hi iam new to php and i can really user ur guys help.
all my code works fine but when i use inclue('header.php'); inclue('index.php'); inclue('footer.php'); it dont work. iam not sure if this is bc of my php tag, include, or my css file it is not working. i have no errors but the website table tag are messed up.
2nd question i had was in index.php file there is a content area. i am trying to move that in center but its not working. i already tried align, center, position tags. nothing works.
there are 4 files down there header.php index.php footer.php and csss.css file
i now its alot of code but plz i really need help with this.
header.php
<?php
session_start();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="csss.css" />
</head>
<body bgcolor='#f1f1f1' text='000000'>
<!--top of page-->
<table align='center' width='95%' bgcolor='#FFFFFF' style='border=color:#999999;border-style:solid;border-width:1px' border=0>
<tr>
<td width = '70%'>
<img src='img/logo.png'>
</td>
<!--login-->
<td>
<!--CHECK IF LOG IN OR NOT-->
<?php
if(isset($_SESSION['user']))
{
echo"
<font size='2' face='arial'><div align='center'>Welcome,</font>".$_SESSION['user']."! <a href='logout.php'>Log out</a><br/><a href='changepassword.php'>change password?</a>";
}
else
{
echo "
<form action='login.php' method='POST'>
<table width='100%'>
<tr>
<td>
<font size='2' face='arial'>Username:</font>
</td>
<td>
<input type='text' name='username' size='16' maxlength='25'>
<a href='register.php'> Register! </a>
</td>
</tr>
<tr>
<td>
<font size='2' face='arial'>Password:</font>
</td>
<td>
<input type='password' name='password' size='16' maxlength='15'>
<input type='submit' value='Login'>
</td>
</tr>
</table>
</form> ";}?>
index.php
<!--ONLY MEMBER CAN SEE THIS PART-->
<?php
include("header.php");
if(isset($_SESSION['user']))
{
echo "
</td>
</tr>
<!--middle page-->
<table align='center' width='95%' bgcolor='#FFFFFF' style='border=color:#999999;border-style:solid;border-width:1px' border=0>
<tr>
<td id='menu1'width='30%'>
<!--menu-->
<h2>MENU</align></h2>
<ul id ='menu'>
<li class='current_page_item'><a href='index.php'>Home</a></li>
<li><a href='picture.php'>Picture</a></li>
<li><a href='album.php'>Album</a></li>
<li><a href='video.php'>video</a></li>
<li><a href='profile.php'>Profil</a></li>
</ul>
</td>
<td width:'70%'>
<!--CONTENT-->
<br/><br>
<font size='4' face='4'>
<b>Recent Images</a></b></font><br/>
<font size='2'>
You havent uploaded any images yet</font><br/>
<br/>
<br/>
<font size='4' face='4'>
<b>Recent video</a></b></font><br/>
<font size='2'>
You havent uploaded any video yet
</font>
<br><br><br><br><br><br><br><br><br><br><br><br>
</td>
</tr>
</table>
";
}
?>
<?php
include("footer.php");?>
footer.php
<div id="footer" width='95%'>
<div id="footer_inner">
<div class="left">
© 2011 updatesite.com - Slogan
</div>
<div class="right">
Updatesite by <a href="ikhlas69@hotmail.com">Ikhlas Ahmed</a>
</div>
</div>
</div>
</table>
</body>
</html>
csss.css
/*LINKS*/
a:link {
color: #3366D4;
text-decoration: none;}
a:hover {
background-color: #DFE5F2;
color: #3366D4;
text-decoration: underline;
font-weight: bold:}
a:active {
background-color:orange;}
algin{
float:center;
}
/*random*/
h2{
border: 3px solid #A7A7A7;
background-color:#4B4B4B;
width:97%;
color:#fff;
}
/* Navigation */
#menu li {
list-style-type: none;
}
#menu1 {
background-color: #fff;
padding: 10 4px 4px;
position:absolute;
left:4%;
top:15%;
width: 18%;
height:0px;
}
#menu {
background: #EAEEFB url('img/nav.png') repeat-y left top;
border: 1px solid #4B4B4B;
border-top: 1px solid #4B4B4B;
width: 140px;
}
#menu li a {
border-bottom: 1px solid #888;
border-top: 1px solid #4B4B4B;
color: #424350;
display: block;
padding: 10px 7%;
text-decoration: none;
width: 86%;
}
#menu li:first-child a {border-top: none;}
#menu li a:hover {
background: url('img/tran.png') repeat-x left bottom;
color: #fff;
}
#menu li.current_page_item a {
background: url('img/tran.png') repeat-x left top;
color: #FFE;
padding: 10px 4% 10px 10%;
}
#menu h2 {
background: url('img/tran.png') repeat-x left top;
border-bottom: 1px solid #4B4B4B;
color: #FFE;
font: bold 0.9em Verdana,sans-serif;
margin: 0;
padding: 6px 12px;
width: 56%;
}
/* Footer */
#footer {
background: url('img/footer.png') no-repeat left center;
border-top: 1px solid #EAEAEA;
color: #888;
margin-top: 16px;
padding: 15px 0 18px 56px;
}
#footer .right
{
position:absolute;
right: 5%;
}
#footer .left
{
position:absolute;
left: 4%;
}
#footer a {
color: #666;
text-decoration: underline;
}
#footer .right, #footer .right a {color: #AAA;}
#footer .right a {text-decoration: none;}
#footer a:hover {color: #333;}