RYN-chan
Gajuma
...your favorite god general...
Posts: 212
|
Post by RYN-chan on Jan 28, 2007 2:29:34 GMT -5
uhm... can somebody teach me how to change a site from html (or css) into a (dot)PHP? I'm having a hard time understanding it ...
|
|
|
Post by a745 on Jan 28, 2007 3:15:10 GMT -5
Oh, right^^. Uhm, this was taught to me first by toomuchfreetime from Raijinken, so credit goes to him. The main point here is to change the .html extension to .php. Well, let's say you've coded your entire layout something like this: Quote:<table border="0"> <tr><td><img src="header.jpg"></td></tr> <tr> <td> NAVIGATION GOES HERE </td> <td> CONTENT GOES HERE </td> </tr> <tr><td><img src="footer.jpg"></td></tr> </table> Instead of having to put that on every page and having to edit every single one of those pages anytime you wanted to do something, you can condense it like this: Step 1: 1. Create a .txt file. Save it under "header.txt" In this file, put the following: Quote:<table border="0"> <tr><td><img src="header.jpg"></td></tr> <tr> <td> NAVIGATION GOES HERE </td> <td> Step 2: Create a .txt file. Save it under "footer.txt". In this file, put the following: Quote:</td> </tr> <tr><td><img src="footer.jpg"></td></tr> </table> Step 3: Make a new file. It can be for any page you want. For example, let's say it was for Tales of Phantasia. So you would make a page named "phantasiaindex.php". In this file, you put the following (The italics are just for clarification): Quote:<?php include('header.txt'); ?> This code takes the stuff you put in the header.txt file and transfers it directly to this page. CONTENT, Whatever that may be.. <?php include('footer.txt'); ?> This code does the same thing, only for the footer file. Now upload all of these to your server. Then, whenever you want to change the navigation to add affiliates or whatever, just open up header.txt, edit it to your liking, save it, re-upload, and BAM! All your pages are instantly changed! If that didn't make any sense (which it probably didn't), feel free to ask any questions!
|
|
RYN-chan
Gajuma
...your favorite god general...
Posts: 212
|
Post by RYN-chan on Jan 28, 2007 3:24:09 GMT -5
whoa....thanks for that tutorial! uhm, may you also reply to the web designing thread?
|
|
|
Post by a745 on Jan 28, 2007 3:34:31 GMT -5
Oh, there was? I'm gonna look into it now.
|
|
RYN-chan
Gajuma
...your favorite god general...
Posts: 212
|
Post by RYN-chan on Jan 31, 2007 2:58:21 GMT -5
thank you so much!
|
|
|
Post by PanbanRichard on Jan 31, 2007 11:03:27 GMT -5
Haha, I was curious about PHP myself as well (Since in my website which I never updated forever, I constantly added the same tags over and over...)
Thanks for the tutorial Abby, that makes two of us inclined in gratitudes. =P[/font]
|
|
|
Post by a745 on Feb 1, 2007 5:05:21 GMT -5
Thank Toomuchfreetime^^. It was kind of him to teach me. he also taught me how to do the rotating banners, as well as how to make a Contact Form^^.
|
|
RYN-chan
Gajuma
...your favorite god general...
Posts: 212
|
Post by RYN-chan on Feb 2, 2007 6:54:50 GMT -5
OMG! hey,, don't forget to teach me how to do rotating banners okay? ^_^
|
|
|
Post by a745 on Feb 4, 2007 2:27:17 GMT -5
|
|