Subscribe via email:

Welcome

Welcome!

Hey Everyone! Welcome @ Eien Cafe! This site is best viewed in Internet Explorer 8, 1024/768 or higher, Opera 11+ and Chrome 10+. I'm Laura the only owner and updater of this site. This is a personal site but there are some resources to help you with your graphic/website, feel free to look around but first read the Terms Of Usage, thank you and enjoy. Before you go, please grab a button to let everyone know about Eien Cafe. Back Home Contact Me!!

Link Out



See codes

My Personal Tweets

Recent Tweets

  • Video: The NEW Periodic Table Song (In Order) (by AsapSCIENCE) The coolest thing I’ve ever heard!!! http://t.co/4nbs8Z312h [#]
  • @UsaUkItaly OMG!!! thanks! this is soooo cool!!! [#]
  • Photoset: 5 weeks???? I’d say 2… or 10 days!! http://t.co/HCAkuLNI8K [#]
  • RT @team_delena3: #RT if you wanna know the truth about #Nian and you're hoping they're still together. #FAV if you don't care about their … [#]
  • Photo: happytwinflames: Hello, fellow Damon fans and stans! Time for our first project for Damon Stan Club,... http://t.co/dmSbC3E30r [#]

Follow

Categories

Stalk me!


DandyID Box.net COLOURlovers Delicious deviantART hi5 LiveJournal MySpace PostCrossing Twitter YouTube FanFiction Tumblr Twitpic TV.com Blogger aNobii Goodreads

Disclaimer

All original images used for graphic, layouts, avatars, etc. belong to their respective creators. I do not take credits for creating any of those images. Only the final work belong to me. No copyright infringement intended. Credits can be found here and here. If I forgot someone or something feel free to contact me.

PHP: Basic PHP

Never heard of PHP? You don’t know what you’re missing! Here how to start a site with (or convert a site in) PHP

What you need:

PHP enabled: you need to be hosted or have a domain, there are some free hosts which offer php but I’ve never tried them.

From HTML to PHP:

If you have already a site in HTML, first you need to change .html at the end of all your pages and write .php. If you’re starting from scratch, lucky you! You don’t need to change anything but create pages with .php extention, meaning everytime you have to save a page, save it as .php and not .html or .htm.

Now we have to start dividing our pages: creating header.php, namepage.php and footer.php.

In your header.php you have the head part of your pages, in the namepage.php the content and in the footer.php what you want to appear at the end of every pages. Here what’s in mine:

:arrow: header.php:

<html>
<head>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<title>YOUR WEB TITLE</title>
<link rel="stylesheet" type="text/css" href="http://YOUR_STYLESHIT_URL.css" />
</head>
<body>

Your layout coding

Change:
YOUR WEB TITLE: with the title of your website;
YOUR_STYLESHIT_URL.css: with the URL of your style shit or CSS if you have one, please make one it’s easier, believe me;
Your layout coding with your layout coding which is above the main area of your pages (if you keep reading, there’s an example to understand this better).

:arrow: namepage.php:

<? include('header.php'); ?>

<p>Welcome!<br />
Here you'll find etc....</p>

<? include('footer.php'); ?>

Here you have to write the content of your pages. So every page has this form with one include at the top (same for every page), the content which changes with every page you write and another include which closes the page. Don’t erase those two includes!

:arrow: footer.php:

End of your layout coding

<p>Ads...</p>
<p>Copyright...</p>
</body></html>

Here you’ll write the end of the page so the tags: </body></html> and before those whatever you want to appear on everypage (for example google ads, copyright, vote for me buttons, quick links and on). Don’t forget the end of your layout coding which can go above the ads or after (depends on your layout).

I’m going to use this div coding to make this clear

<html>
<head>
<!-- Coded with Eien Café http://eiencafe.com/ help -->
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<META NAME="Title" CONTENT="YOUR TITLE">
<META NAME="Author" CONTENT="YOU">
<META NAME="Copyright" CONTENT="© YOUR SITE NAME AND YOUR NAME">
<META NAME="Distribution" CONTENT="Global">
<META NAME="Robots" CONTENT="All">
<title>WEBSITE TITLE</title>
<!-- Erase if you don't have CSS Beginning-->
<link rel="stylesheet" type="text/css" href="URL of your css if you have it or erase this">
<!-- Erase if you don't have CSS end -->
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<img style="position:absolute; top:0px; left:0px" src="YOUR IMAGE URL" border="0">

<div id="MENU1" style="position: absolute; z-index:2; left: XXXpx; top: YYYpx; width:ZZZpx">
main menu, navigation
</div>

<div id="CONTENT" style="position: absolute; z-index:2; left: XXXpx; top: YYYpx; width:ZZZpx">
main page, welcome image, updates and on...
</div>

<div id="MENU2" style="position: absolute; z-index:2; left: XXXpx; top: YYYpx; width:ZZZpx">
submenu
</div>

</body></html>

Now we have to divide it in header.php, namepage.php and footer.php:

:arrow: header.php:

<html>
<head>
<!-- Coded with Eien Café http://eiencafe.com/ help -->
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<META NAME="Title" CONTENT="YOUR TITLE">
<META NAME="Author" CONTENT="YOU">
<META NAME="Copyright" CONTENT="© YOUR SITE NAME AND YOUR NAME">
<META NAME="Distribution" CONTENT="Global">
<META NAME="Robots" CONTENT="All">
<title>WEBSITE TITLE</title>
<!-- Erase if you don't have CSS Beginning-->
<link rel="stylesheet" type="text/css" href="URL of your css if you have it or erase this">
<!-- Erase if you don't have CSS end -->
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<img style="position:absolute; top:0px; left:0px" src="YOUR IMAGE URL" border="0">

<div id="MENU1" style="position: absolute; z-index:2; left: XXXpx; top: YYYpx; width:ZZZpx">
main menu, navigation
</div>

<div id="CONTENT" style="position: absolute; z-index:2; left: XXXpx; top: YYYpx; width:ZZZpx">

:arrow: namepage.php:

<? include('header.php'); ?>

main page, welcome image, updates and on... for the first page and the content of the other pages (for example glitters, graphic...

<? include('footer.php'); ?>

:arrow: footer.php:

</div>

<div id="MENU2" style="position: absolute; z-index:2; left: XXXpx; top: YYYpx; width:ZZZpx">
submenu
</div>

</body></html>

namepage.php will be called index.php as first page (when people write http://yourdomain.com on their browser ;) ) and if you don’t have a splash page this is where there are the updates, blog etc…
it will be whatever else for the other pages ex: in glitters.php there will be a list of your glitter pages.

Now upload all three pages to your server and test it. That’s all, you have a php page, now you can use namepage.php as a template for all your pages.

Leave a Note Leave a Note

First time commenter is held for approvation, please don't post twice ;) I will see your comment and then approve it. Sorry for the inconveniance, it helps prevent spam :P

:D :) :( :o 8) :eek: :lonely: ;-( :grin: :wink: :arrow: :idea: :?: :!: :evil: O:) :-| :-* :-(( :poke: :love: :tired: :emotion: :party: :clown: :worried: X( :p :amused: :bored: :cold: :glasses: :shifty: :high: :horny: :impatient: :indifferent: :loved: :needhug: :pensive: :relaxed: :silly: :smart:

Back to the Previous seen Page | Back Home | Contact Me!!

Copyright © 2007 - 2013 Laura @ EienCafe.Com. Please read the Terms Of Use.
Powered By Wordpress Valid XHTML 1.0 Transitional Creative Commons License