Home | About | My PCs
I'm 16 years old and I'm living in Switzerland. At this time, I'm doing work experience for one year as an IT supporter.
This site is a project of mine.
Picture of me
My other site (German)
If you want to take PHP-code into your HTML-Site, just write the whole HTML-code without the PHP-part. Then you put the PHP-code in, just like here:
<?php
include('menu.html');
?>
Here I did it with the include() command. This reads the file menu.html (which is in the same directory), puts it in where the code is, and sends it to the browser. You can see this in the source of this site, the comments about the menu are from menu.html.
You are not forced to use .html as the filename ending for the included file. I just used it to quickly open it with my HTML-editor. It could also be called menu.include, because it just reads the file as it is and includes it.
I advise you to read the source, because I made comments, so you can understand why I did it that way. There are comments in the normal pages, in the menu.html and in style.css.
Thanks to p0rnflakes, he helped me with the technical part of this and my other site. He's got a website too: Home | p0rnflakes.de
If you have questions, please contact me first, because he doesn't have time to give support to others.
This site is a project of mine.
Picture of me
My other site (German)
I made this site just by coding it, not on a WYSIWYG-Edtior, so you can contact me too if you have question about my site or if you have problems with your own.
I made this site with HTML (for the content), CSS (for the design) and PHP.
I use PHP to automatically read and include the menu from another file, so I only have to change one file to change all the menus (include() for those who are familiar with PHP)
Howto
To do this, I added some code to my site. Please make sure that your server supports PHP, that it's activated and that your filenames are php-compatible (.php or .phtml, I prefer .php)If you want to take PHP-code into your HTML-Site, just write the whole HTML-code without the PHP-part. Then you put the PHP-code in, just like here:
<?php
include('menu.html');
?>
Here I did it with the include() command. This reads the file menu.html (which is in the same directory), puts it in where the code is, and sends it to the browser. You can see this in the source of this site, the comments about the menu are from menu.html.
You are not forced to use .html as the filename ending for the included file. I just used it to quickly open it with my HTML-editor. It could also be called menu.include, because it just reads the file as it is and includes it.
I advise you to read the source, because I made comments, so you can understand why I did it that way. There are comments in the normal pages, in the menu.html and in style.css.
Thanks to p0rnflakes, he helped me with the technical part of this and my other site. He's got a website too: Home | p0rnflakes.de
If you have questions, please contact me first, because he doesn't have time to give support to others.
Some things you need to remember when you're making a website:
- Just because it looks like, doesn't mean it is
- New technologies should only be used if you need them
- Always check your website on multiple browsers
When you're making a website by using a WYSIWYG-editor, you may think: Well, on my screen, my layout is centered, so it also is on other screens. That's not true: You have to remember that the Internet is a place where there are multiple platforms and multiple browsers. The less you're site is depending on, the better it looks like.
When you got a resolution of 1280*1024 and you got an element with 100 pixel width, it is not centered by spacing it 590 pixel from the left.
For normal use of the Internet, a browser is not the only thing you need. You have to get a Flash player and a Java (not Javascript!) interpreter. You have to think about usability. What if there are users with Javascript turned off? Shouldn't they also be able to use your site? There are many reasons to turn it off, a big one is security. Every piece of additional software could make a security hole in your system.
If you'd like to get a nice-looking feature in your site, look for an alternative with proper HTML or CSS.
Different browser do render different. There is one example I experienced by myself: I had a table with some facts about me. The table itself should be centered, so I centered it with <div align="center"> The content in the table should be aligned to the left like normal text.
In Firefox, it was rendered the way I wanted it to. As I opened my website on Internet Explorer, the content was also centered, so I had to manually align the text to the left.
So, if you're not sure, better write it explicitly the way you want it.