Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Building a PHP website


  • Please log in to reply

#1
mayacrunk

mayacrunk

    Member

  • Member
  • PipPip
  • 31 posts
Hi guyz.

Can anyone here teach me how to build a PHP website? I've been to several PHP tutorial websites but I find it very difficult to follow what the tutorial is actually teaching me. I still fumble at the basic things such as Apache, pHp server and mySQL.

So can anyone out there give me no step by step instructions on how to build a pHp website? I have basic knowledge on building a website and on HTML codes.

Your willingness is very much appreciated.
Thanx.
  • 0

Advertisements


#2
Neil Jones

Neil Jones

    Member 5k

  • Member
  • PipPipPipPipPipPipPipPip
  • 8,476 posts
You could always do what's known as "content wrapping".

Uses technology called PHP. At a very simple level, all you do is make one file for the top half of each page (for example, the headers and site links) and one for the bottom of each page (copyright and contact details for example).

Then you just make separate pages for the bits in between and have a little script that sticks them all together and puts them on the screen for the visitors.

Benefits of all this is, saves time in the long run as once you've converted the pages once, no need to do it again as if or when you decide to change the layout/colours/design, just alter the wrappers and everything else will take care of itself.

Something like this:

Open a new file in Notepad, save it as index.php and put this in it:

<?php
include("header.inc");
?>
<h3>This is the main content of your page</h3>
<p>If you right click me and choose View Source, you'll see that I've stuck three bits of HTML together to make a web page!</p>

<?php
include("footer.inc");
?>


Now make another file called header.inc and put this in it:

<html>
<head>
<title>Test Page Type Thing</title>
</head>
<body>

Finally, make another file called footer.inc and put this in it:

</body>
</html>

Upload all three files to a folder on the server, ensure that they're all in the same folder together and then go to that page on the server.

That's all there is to it. Can be made as simple or as complicated as you like. This is very simple PHP page, but it can get a lot more complicated.
  • 0

#3
mayacrunk

mayacrunk

    Member

  • Topic Starter
  • Member
  • PipPip
  • 31 posts
But the problem now is that I do not have any server. No Apache, my SQL, whatsoever. I've downloaded some files/applications from apache.org and php.net but I dunno how to use it. I've deleted each and everyone of them. So now I'm back to square one.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP