Printable Version of Topic

Click here to view this topic in its original format

Hostony Board _ HowTo _ PHP

Posted by: Selmir Jan 16 2008, 10:48 AM

i was just wondering if anyone can instruct me on how to make a php site or upload one and where..and how to get it to work..i also might need somework customizing it lol im pretty sure ill be fine on that part thow never did php.. and a forum where can i get one of those?..lol i should hire someone to do my site but meh i wanna learn..

Posted by: MarkM Jan 16 2008, 02:19 PM

PHP is an extremely powerful thing to know.

This will get you started:
Create three files: index.php, header.php and footer.php

CODE
In index.php put:
<html>
<head>
<title>My Page!</title>
</head>
<body>
<? include 'header.php'; ?>
<? include 'footer.php'; ?>
</body>
</html>


CODE
In header.php put:
<a href="http://google.com">GOOGLE!</a>&nbsp;&nbsp;
<a href="http://hostony.com">HOSTONY!</a>&nbsp;&nbsp;
<a href="http://shoutdrive.com">ShoutDRIVE Radio!</a>


CODE
In footer.php put:
This is my footer. Hello!


You will see that the code in the index.php file, <? include 'whatever.php'; ?> will include all of the contents from the files specified. You can put your content in between the two includes in the index.php file, duplicate the file into different ones like contact.php, etc.

Cheers, bud! Welcome to the world of PHP:
http://us.php.net/manual/en/function.include.php
http://www.codepedia.com/1/BeginnersGuideToPHP

Posted by: MarkM May 3 2008, 03:28 PM

Boy, that turned out to be a waste of time. tongue.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)