nayrz21 Posted May 7, 2009 Share Posted May 7, 2009 I am the owner of www.Team-p90.clanservers.com (Not a free hosting site, but one that comes with a server hosting package) Anyways the whole site is made in HTML which makes editing the tables on the side a pain to do because I would have to go through and edit index.html roster.html media.html etc etc.(reason why its not updated at the moment ) I know if you use a .php You only need to edit one file, however thats all I know. My Questions are 1. What exactly needs to be done 2. A place where I could learn to do this myself/find a person who would be willing to help Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/ Share on other sites More sharing options...
xtopolis Posted May 7, 2009 Share Posted May 7, 2009 I strongly recommend this tutorial: http://www.tizag.com/mysqlTutorial/ Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/#findComment-828232 Share on other sites More sharing options...
AmandaF Posted May 7, 2009 Share Posted May 7, 2009 Also, this one: http://www.tuxradar.com/practicalphp It's literally the entire contents of the O'Reilly book "PHP in a Nutshell", put on the web in a wiki format. Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/#findComment-828445 Share on other sites More sharing options...
revraz Posted May 7, 2009 Share Posted May 7, 2009 Links above, or googling php and mysql will yield you a ton of tutorials, for how to do it yourself. Freelance area if you want to find someone that may help you. But know, it's not as simple as you make it out to be. Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/#findComment-828456 Share on other sites More sharing options...
premiso Posted May 7, 2009 Share Posted May 7, 2009 I know if you use a .php You only need to edit one file, however thats all I know. My Questions are 1. What exactly needs to be done 2. A place where I could learn to do this myself/find a person who would be willing to help 1: Well first thing is first. If your server supports PHP rename all your .html files to .php. This will make the transition easier. If you are for SEO ranking, I would setup a .htaccess that does a 301 redirect from the old .html files to the new .php to keep your ranking and let the spiders/bots know to update. After that you are basically going to be doing more or less templating. Where you have your index.php file which includes your main header, footer and content files. The header and footer files will most likely be static. However, the content file you can make PHP driven with a database if you would like. So instead of having to manually update the file, you could use a PHP-Admin system to update it. You can use MySQL, which would be the preferred method, but depending on how much time you want to spend, you can also just read that file in with file_get_contents and write back the update content to it with fopen and fwrite. 2: Google/PHP.net are both great places to start. Even some of the links mentioned above. But you may want to look for a "Simple CMS (Content Management System)" as that is essentially what you want and I know there are tons of them out there. It is just finding the right one for you. It all depends on how advanced you want this and how much time you want to spend. The CMS would be the easier way to go as it is already coded you just have to learn how to use it and implement it with your current site. Hope that helps, best of luck! Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/#findComment-828502 Share on other sites More sharing options...
AmandaF Posted May 7, 2009 Share Posted May 7, 2009 Actually, I was just thinking: If all you need is the ability to make templates, why not just get a copy of Dreamweaver and use their template system, rather than learning an entire language? Learning PHP just to make templates is like buying a Swiss Army knife when all you need to do is slice bread. Dreamweaver lets you create a template file, associate it with html files, and then any time you edit the template it automatically updates all the files. There are also probably cheaper/free programs with templating capabilities similar to Dreamweaver's. Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/#findComment-828533 Share on other sites More sharing options...
nayrz21 Posted May 7, 2009 Author Share Posted May 7, 2009 I was not sure how simple of a project It would be, hence the "...maybe " Ill look into premiso's Idea and see what happens from there? Though from the second half of your post it seems that using CMS or dreamweaver would be a much simpler/more efficient way to get what I want done? Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/#findComment-828849 Share on other sites More sharing options...
revraz Posted May 7, 2009 Share Posted May 7, 2009 Must simpler and efficient is all based on the user's perspective. Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/#findComment-828861 Share on other sites More sharing options...
bloodgoat Posted May 7, 2009 Share Posted May 7, 2009 Example of how simple it can be: index.php <?php $content = file_get_contents("/path/to/main/directory/".$_GET['page'].".html"); $template = <<< html <html> <head> <title></title> </head> <body> <!-- your template up until the point the content table cell is created --> <!-- content table cell would start here --> $content <!-- content table cell would end here --> <!-- and the rest of your layout after the content table cell is closed --> </body> </html> html; echo $template; ?> Then pages would be along the lines of, index.php?page=whatever_the_filename_is Each content page would now only need to hold whatever content you wanted to be displayed. This is about as simple as it gets, imo. Quote Link to comment https://forums.phpfreaks.com/topic/157184-basic-phpmaybe/#findComment-828947 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.