Jump to content

Need help converting HTML to PHP


seederekrun

Recommended Posts

Ok heres the deal. I have been working on a squadron website for quite some time now and realized that html just isn't the way to go. It seems to be dead so I want to shift towards a PHP ran site. My site is really simple and I am sure that my question is going to be retarded but I have been toying with it for far too long.

At www.puggo.com you can see my website. The goal is to keep everything in union except for the text in the middle of the page which will change when you click on any of the links. Also the menu on the lefthand side needs submenus. The problem I face is that I want to have a "Recent Articles" section and it just seems difficult to figure out how to keep a template for every page. It seems if I make any change I have to change all the pages which is a lot of work. Anyone got any solutions even if it isn't php?

Thanks for your help in advance!

-Derek, the confused one
Link to comment
Share on other sites

If you have no programming experience, you are probably best off using an existing content management system (CMS), that allows you to change/edit the content of your site easily. There are tons of PHP/MySQL options out there. Of course, another option is to code it in PHP yourself. There is really no "conversion" from HTML-to-PHP involved, as much as it is just writing the code from scratch. An HTML page is static and the content does not change. You lay out the tables, type in the text manually, and define what your layout is going to be. PHP gives you the ability to dynamically generate the content, and even display it conditionally.

Good luck.
Link to comment
Share on other sites

[code]
<?php

///   Header.php
?>
<html><head>Head specific content here</head>
<title>Page Title</title>
<body><table 1>Banner upper barlinks etc</table>
<table 2>Left side nav bar</table>




<?php

/// whatever page index for arguement sake.
// index.php

include "header.php";  // includes your upper logo, and left hand navmenu
?>
<table>Main site content</table>
<?php
include "footer.php";  // includes right hand nav menu and lower site info
?>

<?php

// footer.php
?>
<table 3>Right hand menu</table>
<table 4>bottom site specs/author shouts whatever</table>
</body></html>
[/code]

From creating a header.php and footer.php you can simply include those two at the start and end of your script and keep all pages uniform. I know the explanation was haphazard, but I hope I gave you some inspiration.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.