Adding PHP login script to homepage
Posted: Thu Aug 12, 2010 7:27 am
Hi.
I most recently made a register and login page using this site http://www.knowledgesutra.com/forums/to ... -tutorial/
worked fine.
My Questions is how would i implement the login page into my Homepage. i would like user name and password boxes on the left hand side when on the hompage.
my homepage code is
and also the css is
Thank-you any ideas would be greatly appreciated
I most recently made a register and login page using this site http://www.knowledgesutra.com/forums/to ... -tutorial/
worked fine.
My Questions is how would i implement the login page into my Homepage. i would like user name and password boxes on the left hand side when on the hompage.
my homepage code is
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>LS Photos</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="logo-wrap">
<div id="logo">
<h1>Land Scene</a></h1>
<h2> Fine Art Landscape Photography</h2>
</div>
</div>
<!-- start header -->
<div id="header">
<div id="menu">
<ul>
<li class="current_page_item"><a href="#">Homepage</a></li>
<li><a href="#">Blogs</a></li>
<li><a href="#">Photos</a></li>
<li><a href="#">About</a></li>
<li class="last"><a href="#">Contact</a></li>
</ul>
</div>
</div>
<!-- end header -->
<!-- start page -->
<div id="wrapper">
<div id="wrapper-btm">
<div id="page">
<!-- start content -->
<div id="content">
<object width="550" height="400">
<param name="movie" value="myalbum.swf">
<embed src="myalbum.swf" width="550" height="400">
</embed>
</object>
<div class="post">
<h1 class="title">Welcome to our website </h1>
<div class="entry">
<p><img src="images/img06.jpg" alt="" width="140" height="125" class="left" />This is Harvest, is a free template from <a href="http://freecsstemplates.org/">Free CSS Templates</a> released under a <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5 License</a>. The flower photo is from <a href="http://www.pdphoto.org/">PDPhoto.org</a>. You're free to use this template for both commercial or personal use. I only ask that you link back to <a href="http://freecsstemplates.org/">my site</a> in some way. Enjoy :)</p>
</div>
<div class="meta">
<p class="byline">Posted on July 21, 2007 byFreeCssTemplates</p>
<p class="links"><a href="#" class="more">Read full article</a> <b>|</b> <a href="#" class="comments">Comments (32)</a></p>
</div>
</div>
<div class="post">
<h2 class="title">Lorem Ipsum Dolor Volutpat</h2>
<div class="entry">
<p>Curabitur tellus. Phasellus tellus turpis, iaculis in, faucibus lobortis, posuere in, lorem. Donec a ante. Donec neque purus, adipiscing id, eleifend a, cursus vel, odio. Vivamus varius justo sit amet leo. Morbi sed libero. Vestibulum blandit augue at mi. Praesent fermentum lectus eget diam. Nam cursus, orci sit amet porttitor iaculis, ipsum massa aliquet nulla, non elementum mi elit a mauris. In hac habitasse platea.</p>
<p>Vestibulum blandit augue at mi. Praesent fermentum lectus eget diam. Nam cursus, orci sit amet porttitor iaculis, ipsum massa aliquet nulla, non elementum mi elit a mauris. In hac habitasse platea.</p>
</div>
<div class="meta">
<p class="byline">Posted on July 18, 2007 byFreeCssTemplates</p>
<p class="links"><a href="#" class="more">Read full article</a> <b>|</b> <a href="#" class="comments">Comments (32)</a></p>
</div>
</div>
</div>
<!-- end content -->
<!-- start sidebar -->
<div id="sidebar">
<ul>
<li id="search">
<h2>Search</h2>
<form method="get" action="">
<fieldset>
<input type="text" id="s" name="s" value="" />
<input type="submit" id="x" value="Search" />
</fieldset>
</form>
</li>
<li>
<h2>Lorem Ipsum</h2>
<ul>
<li><a href="#">Fusce dui neque fringilla</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li>
<li><a href="#">Nec metus sed donec</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li>
<li><a href="#">Velit semper nisi molestie</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li>
</ul>
</li>
</ul>
</div>
<!-- end sidebar -->
<div style="clear: both;"> </div>
</div>
<!-- end page -->
</div>
</div>
<!-- start footer -->
<div id="footer">
<div id="footer-wrap">
<p id="legal">(c) 2007 YourSite. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>
</div>
<!-- end footer -->
</body>
</html>Code: Select all
/*
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
*/
body {
margin-top: 49px;
padding: 0;
background: #242424;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
color: #BBBBBB;
}
h1, h2, h3 {
margin: 0;
font-weight: normal;
}
h1 {
letter-spacing: -1px;
font-size: 32px;
}
h2 {
font-size: 23px;
color: #48ACDE;
}
p, ul, ol {
margin: 0 0 2em 0;
text-align: justify;
line-height: 26px;
}
a:link {
color: #48ACDE;
}
a:hover, a:active {
text-decoration: none;
color: #48ACDE;
}
a:visited {
color: #48ACDE;
}
img {
border: none;
}
img.left {
float: left;
margin-right: 15px;
}
img.right {
float: right;
margin-left: 15px;
}
/* Form */
form {
margin: 0;
padding: 0;
}
fieldset {
margin: 0;
padding: 0;
border: none;
}
legend {
display: none;
}
input, textarea, select {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 13px;
color: #333333;
}
/* Header */
#header {
clear: both;
width: 860px;
height: 52px;
margin: 0 auto;
background: url(images/img02.jpg) no-repeat left top;
}
/* Menu */
#menu {
float: left;
width: 860px;
height: 54px;
padding-left: 10px;
background: url(images/img01.jpg) no-repeat left top;
}
#menu ul {
margin: 0;
padding: 0px 0 0 0px;
list-style: none;
line-height: normal;
}
#menu li {
display: block;
float: left;
}
#menu a {
display: block;
float: left;
margin-right: 3px;
padding: 10px 20px;
text-decoration: none;
text-transform: lowercase;
font: 13px "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #FFFFFF;
}
#menu a:hover {
text-decoration: none;
color: #48ACDE;
}
#menu .current_page_item a {
color: #48ACDE;
}
/** LOGO */
#banner {
width: 620px;
height: 240px;
margin: 0 auto;
padding: 10px 0 0 0;
background: myalbum.swf left top;
}
#logo {
width: 820px;
height: 60px;
margin: 0 auto;
}
#logo h1, #logo h2 {
float: left;
margin: 0;
padding: 0 0 0 20px;
line-height: normal;
}
#logo h1 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size:36px;
font-style: italic;
}
#logo h1 a {
text-decoration: none;
color: #FFFFFF;
}
#logo h1 a:hover { text-decoration: underline; }
#logo h2 {
padding: 20px 0 0 5px;
font: italic 13px Georgia, "Times New Roman", Times, serif;
color: ##48ACDE;
}
#logo p a {
text-decoration: none;
color: #B6ACA2;
}
#logo p a:hover { text-decoration: underline; }
#wrapper {
width: 860px;
margin: 0 auto;
background: #000000 url(images/img02.jpg) no-repeat left top;
}
#wrapper-btm {
background: url(images/img03.jpg) no-repeat left bottom;
}
/* Page */
#page {
width: 860px;
margin: 0 auto;
padding-top: 20px;
}
/* Content */
#content {
float: right;
width: 620px;
}
/* Post */
.post {
padding: 15px 15px;
}
.post .title {
margin-bottom: 20px;
padding-bottom: 5px;
}
.post h1 {
}
.post h2 {
height: 32px;
padding: 8px 0 0 15px;
font-size: 18px;
color: #DADADA;
}
.post .entry {
padding: 0 15px;
}
.post .meta {
margin-left: 15px;
margin-right: 15px;
padding: 15px 0px 30px 0px;
border-top: 1px dashed #333333;
font-size: 10px;
}
.post .meta p {
margin: 0;
line-height: normal;
color: #999999;
}
.post .meta .byline {
float: left;
}
.post .meta .links {
float: right;
}
.post .meta .more {
padding: 0 20px 0 18px;
background: url(images/img11.gif) no-repeat left center;
}
.post .meta .comments {
padding-left: 22px;
background: url(images/img12.gif) no-repeat left center;
}
.post .meta b {
display: none;
}
/* Sidebar */
#sidebar {
float: left;
width: 210px;
padding-left: 30px;
}
#sidebar ul {
margin: 0;
padding: 0;
list-style: none;
}
#sidebar li {
margin-bottom: 40px;
}
#sidebar li ul {
}
#sidebar li li {
margin: 0;
}
#sidebar h2 {
height: 32px;
margin-bottom: 10px;
font-size: 18px;
color: #DADADA;
}
/* Search */
#search {
}
#search h2 {
margin-bottom: 20px;
}
#s {
width: 115px;
margin-right: 5px;
padding: 3px;
border: 1px solid #BED99C;
}
#x {
padding: 3px;
border: none;
background: #48ACDE;
text-transform: lowercase;
font-size: 11px;
color: #FFFFFF;
}
/* Boxes */
.box1 {
padding: 20px;
}
.box2 {
color: #BABABA;
}
.box2 h2 {
margin-bottom: 15px;
font-size: 16px;
color: #FFFFFF;
}
.box2 ul {
margin: 0;
padding: 0;
list-style: none;
}
.box2 a:link, .box2 a:hover, .box2 a:active, .box2 a:visited {
color: #EDEDED;
}
/* Footer */
#footer-wrap {
width: 860px;
height: 64px;
margin: 0 auto;
}
#footer {
margin: 0 auto;
height: 64px;
min-height: 64px;
padding: 0;
font-size: 10px;
}
html>body #footer {
height: auto;
}
#footer p {
}
#legal {
clear: both;
padding-top: 10px;
padding-left: 30px;
text-align: center;
color: #999999;
}
#legal a {
}