• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Learning HTML

Morkula

[b][color=#356F93]Get in the Game[/color][/b]
  • 7,297
    Posts
    20
    Years
    Hey guys, where did you all learn HTML and PHP? I really want to learn it so I can build a better website. Are there any tutorial programs that I could download, or books that I should buy?

    Also, does anyone have the code for keeping the sidebars on every page? For example, if I get a new affiliate, I won't have to manually add the button to every page. I've been told that there's a code for that.

    Thanks!
     
  • 3,549
    Posts
    20
    Years
    this will explain things well

    PHP Setup.

    Specs:
    Skill: Medium to advanced
    Tools: Dreamweaver *Reccomended*
    any html editor or notepad will do.
    Time: 30 minutes to an hour
    Are you tired of updating ten hundred pages when ever a link chages? Then STOP!
    Imakuni? is here to help you!
    First change your index.html to index.php. Make sure your host supports php codes (If you dont have php the index.php file would work but the below code wouldnt.)
    Now Copy

    Code:
     <?php
       if(isset($_GET['id']))
       {
       $id=$_GET['id'];
       if(is_file($id . ".php"))
       {
       include $id . ".php";
       }
       else
       {
       if(is_file($id . ".html"))
       {
       include $id . ".html";
       }
       else include "404.html";
       }
       }
       else include "[i]main.html[/i]";
     ?>

    Into where you want your content to appear. Then make a html page called "main.html". If you have a news program or dont want main.html then change the page the page that I put in italics to the url of what you want to appear there. That will be what shows up in the index.php.
    You think your done yes? No your not now to make special links.

    You have to change all the link to index.php?id=nameofpage for ex.
    Lets say i have a page called ruby.php i would take the name of the page
    (ruby), with out the .php and add that after id, so it would be index.php?id=ruby and uses that as the link One last thing you would have to change one thing in index.php (well maybe) if your main page is main.html done change nothing but if your mainpage is main.php in index.php where it says

    Code:
    else include "[i]main.html[/i]";
    If its NOT main.html change it to the page you want to include.

    change it to main.php that's the only thing you will need to change in the index.php. If it is main.php it will say

    Code:
    else include "[i]main.php[/i]";
    If its NOT main.php change it to the page you want to include.

    if you need a php host try t35.com or hostultra.com
     
    Last edited:

    Castrainer

    Banned
  • 6,990
    Posts
    20
    Years
    • Seen Apr 8, 2006
    At PPN an PWC there are some sites in the "Webmaster Links" section that shall help ya... Try them out!
     

    Kipkip

    Join the Revolution
  • 968
    Posts
    20
    Years
    • Age 33
    • Seen Jun 24, 2007
    Imakuni?, the code won't work unless you put <?php and ?> tags in. Lissa Explains is good for beginning HTML and PHP/SSI includes and WebMonkey is best for advance coding such a PHP/MySQL.
     

    Morkula

    [b][color=#356F93]Get in the Game[/color][/b]
  • 7,297
    Posts
    20
    Years
    Imakuni? said:
    this will explain things well

    PHP Setup.

    Specs:
    Skill: Medium to advanced
    Tools: Dreamweaver *Reccomended*
    any html editor or notepad will do.
    Time: 30 minutes to an hour
    Are you tired of updating ten hundred pages when ever a link chages? Then STOP!
    Imakuni? is here to help you!
    First change your index.html to index.php. Make sure your host supports php codes (If you dont have php the index.php file would work but the below code wouldnt.)
    Now Copy

    Code:
     <?php
       if(isset($_GET['id']))
       {
       $id=$_GET['id'];
       if(is_file($id . ".php"))
       {
       include $id . ".php";
       }
       else
       {
       if(is_file($id . ".html"))
       {
       include $id . ".html";
       }
       else include "404.html";
       }
       }
       else include "[i]main.html[/i]";
     ?>

    Into where you want your content to appear. Then make a html page called "main.html". If you have a news program or dont want main.html then change the page the page that I put in italics to the url of what you want to appear there. That will be what shows up in the index.php.
    You think your done yes? No your not now to make special links.

    You have to change all the link to index.php?id=nameofpage for ex.
    Lets say i have a page called ruby.php i would take the name of the page
    (ruby), with out the .php and add that after id, so it would be index.php?id=ruby and uses that as the link One last thing you would have to change one thing in index.php (well maybe) if your main page is main.html done change nothing but if your mainpage is main.php in index.php where it says

    Code:
    else include "[i]main.html[/i]";
    If its NOT main.html change it to the page you want to include.

    change it to main.php that's the only thing you will need to change in the index.php. If it is main.php it will say

    Code:
    else include "[i]main.php[/i]";
    If its NOT main.php change it to the page you want to include.

    if you need a php host try t35.com or hostultra.com


    Huh?????????
    Please....speak....English.... :P
    I don't even know HTML (pathetic but true).
    And I think I have a PHP host (I'm hosted by Kyle- I'm fairly sure he's a PHP host). And I don't have Dreamweaver. I'm using Mozilla Composer, but I can use Notepad too.
     
  • 1,361
    Posts
    20
    Years
    • Age 38
    • Seen Sep 27, 2009
    I learned from myself. About 5 years ago when I started I just knew the basics, and then started studying ppl's sources and seeing how they did it. (if you do this, just look, dont take!)
     

    Morkula

    [b][color=#356F93]Get in the Game[/color][/b]
  • 7,297
    Posts
    20
    Years
    How long does it take to learn HTML and make a decent site?

    And I've heard that Arachnophilia is a good HTML editor. Should I download it or stick with Notepad?
     

    Kipkip

    Join the Revolution
  • 968
    Posts
    20
    Years
    • Age 33
    • Seen Jun 24, 2007
    I like HTML-KIT the best because it'll complete some HTML tags with you just typing the beginnin part of a tag. HTML takes a while to learn. There are a lot of good tutorials just view by above post.
    Kip-kip said:
    Imakuni?, the code won't work unless you put <?php and ?> tags in. Lissa Explains is good for beginning HTML and PHP/SSI includes and WebMonkey is best for advance coding such a PHP/MySQL.
    Like AZSupraT, I learned most of my HTML by looking at people's site sources. I wouldn't recommend Dreamweaver because that's lazy and cost a few hundred bucks while you can do everything for free but it'll take a while. You can also learn from Mozilla Composer by posting a thing and then looking at the HTML source and study it.
     

    Morkula

    [b][color=#356F93]Get in the Game[/color][/b]
  • 7,297
    Posts
    20
    Years
    OK, I dug up a book about HTML last night that I forgot I had. I've finished the Basic HTML, Intermediate HTML, and Table Tutorials, and I still have to do the Web Design chapters. But I'm almost done with the book- HTML isn't as hard as I thought it was ^_^.

    BTW, could someone PLEASE explain what Kuni said in plain English?
     
    Last edited:

    Kipkip

    Join the Revolution
  • 968
    Posts
    20
    Years
    • Age 33
    • Seen Jun 24, 2007
    RoboMechaWobbuffet said:
    OK, I dug up a book about HTML last night that I forgot I had. I've finished the Basic HTML, Intermediate HTML, and Table Tutorials, and I still have to do the Web Design chapters. But I'm almost done with the book- HTML isn't as hard as I thought it was ^_^.

    BTW, could someone PLEASE explain what Kuni said in plain English?
    This is what he said.
    Where your content will go, insert this:
    PHP:
    <?php
    if (!$id) {
    $id = "main";
    $include = $id . ".txt";
    }
    else {
    $include = $id . ".txt"; 
    }
    if (is_file($include) == "1") {
            include $include;
    }
    else {
    include "404.txt"; 
    }
    ?>
    The
    PHP:
     $id="main";
    is the page it will show first when you view the site. This can be index2 or main. The
    PHP:
    $include = $id . ".txt";"
    will tell you what file extension main will be. In this example, it'll be .txt but it can be .html or .shtml or .php etc. This,
    PHP:
    else {
    include "404.txt";
    will show a 404 error page you made saying it can't find the page. Then save your file a index.php. Then in your links, insead of this: something.html, you put
    PHP:
    index.php?id=youpagename
    Replace you page name with your page name. This will show the page you made that has that name in the content area. To edit your columns, just edit index.php. For a better tutorial, go here:
    https://the-apcc.com/webmasters/tutorials/php.php
     

    Morkula

    [b][color=#356F93]Get in the Game[/color][/b]
  • 7,297
    Posts
    20
    Years
    So, this is what I'm getting from that APCC tutorial. Let me know if I'm wrong.

    1. First, I need to make my menus (I'm coding a new layout now) and not put any content between them.
    2. Put this code where the content would normally go.
    Code:
    <?php include ("$id.txt"); ?>
    <?php if($id=="") { $id="index2"; } ?>
    <?php if (!file_exists("$id.html")) { $id = "index2"; }?>
    3. Save the file as index.php
    4. Change all links to index.php?ID=pagehere
    5. Create a new file "index2.html" to be the main page.
    6. Check the link "https://www.kyletech.us/wobbuffetcentral/index.php?id=index2"
    7. The sidebars should be on both sides of the content.

    So is that right?
    BTW, I learned HTML ^_^.
     

    Kipkip

    Join the Revolution
  • 968
    Posts
    20
    Years
    • Age 33
    • Seen Jun 24, 2007
    Yeah, but use this code:
    PHP:
    <?php
    if (!$id) {
    $id = "main";
    $include = $id . ".txt";
    }
    else {
    $include = $id . ".html";
    }
    if (is_file($include) == "1") {
            include $include;
    }
    else {
    include "404.txt";
    }
    ?>
    instead of this
    PHP:
    <?php include ("$id.txt"); ?>
    <?php if($id=="") { $id="index2"; } ?>
    <?php if (!file_exists("$id.html")) { $id = "index2"; }?>
    because I ran into problems with the one at APCC. Then you also create a 404 Page Not Found page called 404.txt. And that's it. :D
     

    Morkula

    [b][color=#356F93]Get in the Game[/color][/b]
  • 7,297
    Posts
    20
    Years
    OK, thanks! Sorry if I seem a little bit dense. I'm really not... :P
     
    Last edited:

    Rukario

    Banned
  • 7,597
    Posts
    21
    Years
    Imakuni? said:
    this will explain things well

    PHP Setup.

    Specs:
    Skill: Medium to advanced
    Tools: Dreamweaver *Reccomended*
    any html editor or notepad will do.
    Time: 30 minutes to an hour
    Are you tired of updating ten hundred pages when ever a link chages? Then STOP!
    Imakuni? is here to help you!
    First change your index.html to index.php. Make sure your host supports php codes (If you dont have php the index.php file would work but the below code wouldnt.)
    Now Copy

    Code:
     <?php
       if(isset($_GET['id']))
       {
       $id=$_GET['id'];
       if(is_file($id . ".php"))
       {
       include $id . ".php";
       }
       else
       {
       if(is_file($id . ".html"))
       {
       include $id . ".html";
       }
       else include "404.html";
       }
       }
       else include "[i]main.html[/i]";
     ?>

    Into where you want your content to appear. Then make a html page called "main.html". If you have a news program or dont want main.html then change the page the page that I put in italics to the url of what you want to appear there. That will be what shows up in the index.php.
    You think your done yes? No your not now to make special links.

    You have to change all the link to index.php?id=nameofpage for ex.
    Lets say i have a page called ruby.php i would take the name of the page
    (ruby), with out the .php and add that after id, so it would be index.php?id=ruby and uses that as the link One last thing you would have to change one thing in index.php (well maybe) if your main page is main.html done change nothing but if your mainpage is main.php in index.php where it says

    thats an aweful big php include code.. and totally unneeded if your pages are already HTML (.html)

    Try this one instead:
    PHP:
    <?php
    if (!$id) {
    $id = "main";
    $include = $id . ".html";
    }
    else {
    $include = $id . ".html";
    }
    if (is_file($include) == "1") {
            include $include;
    }
    else {
    include "404.html";
    }
    ?>

    it's a bit faster as there is less else if's..

    As for learning HTML/PHP. i'm like everyone, i learned by doing.. first with help found at geocites help pages then on my own and by viewing sources (seems that way works well, lol)

    I currently use HTML-Kit as my editor and all my websites since 2001 have been built using it. I have dreamweaver, M$ Front Page, and some others.. I wouldn't use anything but HTML-Kit!
     

    Morkula

    [b][color=#356F93]Get in the Game[/color][/b]
  • 7,297
    Posts
    20
    Years
    umm...problem. Steve, I put the code between the sidebars and I made a test main.html page. But whenever I use the index.php?id=main address, it just shows the index.php page without the content.
     

    Kipkip

    Join the Revolution
  • 968
    Posts
    20
    Years
    • Age 33
    • Seen Jun 24, 2007
    RoboMechaWobbuffet said:
    umm...problem. Steve, I put the code between the sidebars and I made a test main.html page. But whenever I use the index.php?id=main address, it just shows the index.php page without the content.
    Make a file called phpinfo.php and put only this code in it:
    PHP:
    <?php
    
    phpinfo();
    
    ?>
    Then upload it and go to https://yourwebsiteurl.com/phpinfo.php and see if it has anything. If it shows up blank, you host doesn't have PHP enabled. Also make sure the sidebar page is called index.php.
     

    Morkula

    [b][color=#356F93]Get in the Game[/color][/b]
  • 7,297
    Posts
    20
    Years
    OK, I got it to show the content, but it's moving the right sidebar down instead of going between the sidebars. See?
     

    aRedMoon

    Wait for me outside the lines
  • 11,127
    Posts
    20
    Years
    *doesn't read any of the replies*

    Where you would normally put your buttons put this code
    PHP:
    <?php include("right.inc") ?>

    And then make a file, name it "right.inc" without the quotes, and put your affiliate buttons in there. Now whenever you want to add a new one, just stick it in right.inc and all shall be well.
     
  • 2,774
    Posts
    20
    Years
    • Age 35
    • Seen Oct 15, 2012
    i learned to use html in a class, you might want to check one of those out, they help a lot.
     
    Back
    Top