Help - Search - Members - Calendar
Full Version: PHP
Hostony Board > General Support > HowTo
Selmir
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..
MarkM
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:
PHP.net Manual
PHP Beginners Guide
MarkM
Boy, that turned out to be a waste of time. tongue.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.