PHP Cookie User System Part 1
Views:
Author: Chris

Div Layout


Save your style.css and open your index.php file and enter the following infomation



<!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>Untitled Document</title>

<link href="/includes/style.css" rel="stylesheet" type="text/css" />



<style type="text/css">

body{background:#CCCCCC; font-family: Verdana, Arial, Helvetica, sans-serif; margin:0px; font-size:13px;} /* I prefer a font size of 13 because screens are getting higher resolutions on smaller screens, I used to use 11 and 12 but 13 looks better in my opinion*/



#container{background:#FFF; margin:0 auto 0 auto; width:780px; border:1px solid #0099FF; padding:5px;}/*this will center our site and give it a border IE 6+ and most other browsers*/





a:link {color: #0066CC; text-decoration: none;}

a:visited {text-decoration: none; color: #0066CC;}

a:hover {text-decoration: underline; color: #0099FF;}

a:active {text-decoration: none; color: #0099FF;}



#header{padding:10px; background:#C6DFFF; font-size:24px;}

</style>



</head>

<body>





<div id="container">



<div id="header">TutNation.com User System</div>






<?php

$page 
$_GET[page]; //for example it will grab from the url http://www.yoursite.com/?page=admin , $page will = admin



if(file_exists("$page.php")){//if the file we are looking for is on your server

include("$page.php");        //open the file inside our template

}else{                        //otherwise it doesn't exist on our server so do...

echo "FILE NOT FOUND";        //Echo FILE NOT FOUND, echo basically means put the following html or text here

}                            //End our if statement!

?>



</div>





</body>

</html>





Save your index.php and SOON I will post part two which is where we get into the action, sorry to get your hopes up if I did but I need a break from typing for a little while!

Back to the Start...

1 2 3



Comments
You must be logged in or register an account with us before posting a comment.

eldablo1
i like it

Chris
I really need to get around to posting part two

Daud
yeah, part2 would be nice.
Statistics
Member Stats Online Members, read legend below: .
Registered Users: 5 registered AND activated.
Member Level Legend NOTE: If the username is underlined it means they may just have the page open and not actually be surfing the site. Administrator
Home

Membership Login

Shout Box

» GO FULL!
Please login to post a shout. » Turn OFF chat!

Point Leader board

© Copyright 2006 - 2008 Tutnation.com and ChrisTheFeral.com