Deacon's WD Tutorials: Guide 1

Discussion in 'Guides' started by Deacon Frost, Apr 21, 2008.

Deacon's WD Tutorials: Guide 1
  1. Unread #1 - Apr 21, 2008 at 7:03 PM
  2. Deacon Frost
    Joined:
    Jan 30, 2007
    Posts:
    2,905
    Referrals:
    3
    Sythe Gold:
    57

    Deacon Frost Grand Master
    Banned

    Deacon's WD Tutorials: Guide 1

    Deacon's WD Guides

    (All guide's done for web development, created by Deacon Frost, are the intellectual Property of Codement, owned and operated by Deacon Frost. Any copying of guides is not allowed. Every guide created is made for a low level of experience. All guides are meant to get people interested and into the idea of web development. No pictures are used in these guides to promote the left side of your brain, not the right. We want you to think in numbers and letters, not in pictures and ideas. The usage of any guides heretofrom is allowed for personal benefit, or professional usage only. These are my own words, thoughts, ideas, and abilities. Thank you for reading.)

    Guide 1: Understanding PHP and the Basics

    PHP stands for... Well who gives a shit. It's a server side scripting language, can be considered a programming language to some extent, and is VERY powerful by itself, and in combination with other languages. To understand PHP you must understand web programming. So I've decided to write out a simple list for you to understand what I am talking about in future guides.

    A website is a collection of information. If you wish to understand the data inside, you must understand the most extreme math.

    When you visit a website, everything you see is on a page somewhere. It is all written, and displayed back.

    Most webpages include the following languages regularly: (X)HTML, CSS, PHP, and Javascript. For a normal basic site, you need at least the first two, if you want more abilities on your site, you must include PHP, and if you want quick sites with lots of user interaction, javascript can be used as well.

    Don't worry if you don't understand CSS, if you don't understand (X)HTML, and even if you don't understand the other two. Really, you can feel for things. But how it works is shown in the following:

    The CSS file contains all the presentational data on a page. For instance the color of the text, the position of a picture, and even the background. This can be done using HTML, however, many users, browsers, and the most unknowledged people don't appreciate this. Mainly because CSS allows for the best of presentational data, whereas HTML is limited.

    The (X)HTML code is the normal everyday text. It is what is shown the user, and it is what you see on the page. When you read "LOL" in a post, that is in the (X)HTML part of the code. To see the (X)HTML, simply view the source code, and scroll through to match parts of the text file to parts of the site. You'll understand it quickly.

    PHP is used for many things. When used in combination with a database (more importantly MySQL because that's all I've used), PHP becomes one of the web's most powerful languages capable of running a full site in just a few text files. By itself it is very useful, however, and can be done to send emails, display times, check spelling, block bad words, anything you choose, PHP can probably accomplish it.

    Javascript is another powerful programming language, however, it does not do the same as PHP in many fields. Where it is strong, PHP is weak, where it is weak, PHP is strong. This is why they go so well together. In the first few tutorials of mine, I won't be covering anything but PHP. This is just to get you familiar with what they various languages are.

    Let's say you have an (X)HTML file, which is all this text you've prewritten. You have a CSS file to show us how to display it, and you have some php script you want to include.

    It is easy to put the php right on the page, for it's not any different. You simply just put it right inside of your (X)HTML file wherever you choose. We'll have some examples in the next guide, but PHP is really easy to learn, and since it's such a loose language, once you grasp the basics you'll be fine.

    I understand many of you on this site are not focussed on programming, or web development, but only RuneScape. That's fine, however, the exposure to such a powerful game is very good for your mind. If you want to write a game like RuneScape, you gotta start somewhere, and I highly recommend PHP as your beginning point.

    So let's go onto understanding PHP.

    <?php

    is how you start any php script you plan on writing. It MUST be included. Why? Well, if you were to take (don't get worried, its just an example) echo "Hi how are you today"; and put it directly onto a page without that beginning, when the page loads, it would read it as pure html. Meaning, it would display "echo "Hi how are you today";" right on the page.

    <?php is called a delimiter. It basically serves the purpose of telling the page what it's supposed to do.

    ?> is another delimiter, however, in this case, it is the end of the script. This tells the page that it is no longer reading PHP and to do whatever else it has been told to do.

    Anything inside of:

    <?php ?> will be ran like php, and do whatever it is told to do. The code inbetween is what is ran, the code outside of it is what ever else you have on the web page.




    Sure everyone understands delimiters, well most people. You have
    Code:
    [url][/url]
    which is a form of a delimiter. It tells the page, or in our case the forum, that whatever is inside of those brackets is a url. The same thing with PHP.


    Here's a snippet code that will run well...


    Code:
    <html>
    <head>
    <title>Hello World</title>
    </head>
    <body>
    <?php
    echo "hello world!";
    ?>
    </body>
    </html>
    
    OH NOW! What did we do here/

    Let's break it down.

    Code:
    <html>
    
    That tells us that we are starting to run html code, and anything inbetween that is to be HTML.

    Code:
    <head>
    <title>Hello World</title>
    </head>
    
    That tells us that we are in the head of the html code, and the title is to be "Hello World". If it says "head" it is going to be displayed in the head of the browser.

    Code:
    <body>
    
    That tells us that we are now entering the body of the code, and anything displayed will be displayed in the body of the browser.

    Code:
    </body>
    </html>
    
    That tells us that we are no longer showing text inside the body, and the html part tells us that we are no longer coding html from the first delimiter.

    So what about the middle?

    Code:
    <?php
    echo "hello world!";
    ?>
    
    You have your delimiters: <?php ?>, which you should know by now, and you have your first script:

    Code:
    echo "hello world!";
    
    What's this you ask? Well, echo is what is used to display on the browser, wherever the script is located. If you were to write hello world! right in the html code, it would do the same as the above script. Display a string of text.

    echo is the command, it is saying that the code is to "echo" or say ;), the following. We put what it is supposed to say, much like we would quote what someone else was saying.

    So what's the ';' for you ask? well, this part of the code tells the php that, that line is done. If you don't close that line, the php will read on, and you'll get errors telling you it can't stop. We put the ; there to tell the php to do THAT and stop.

    At which point, we would have our first script!



    How can you test this? Well, it's not too difficult to test html, but to test PHP you do have to have a server. Or you can go to w3schools.com, and find one of their examples, edit it to fit whatever you're testing, and see if it works.

    Or you could by a host, start a website, and go through all that. We'll have an off tutorial about that later.


    This concludes the first tutorial, of the basic php. The next one will be posted in three days after user feedback/questions!

    Please send all questions to my email: [email protected]


    I will answer them in the next guide "PHP Forms".
     
  3. Unread #2 - Apr 21, 2008 at 7:37 PM
  4. Faskist
    Joined:
    Apr 25, 2005
    Posts:
    1,869
    Referrals:
    0
    Sythe Gold:
    0

    Faskist Tuxhead
    Banned

    Deacon's WD Tutorials: Guide 1

    Overall I agree with most of this, but js is by no means powerful :p


    I also think you fudged the explanation of how HTML and CSS are intepreted and displayed. Maybe go into detail about video memory.
     
  5. Unread #3 - Apr 21, 2008 at 7:39 PM
  6. Brandeis
    Joined:
    Mar 9, 2007
    Posts:
    1,154
    Referrals:
    0
    Sythe Gold:
    0

    Brandeis AKA WoW Blows
    Banned

    Deacon's WD Tutorials: Guide 1

    Great guide...but when you started to explain HTML interpretation you didn't make a few things clear enough which kind of lost me. But other than that it's a good guide.
    Weren't you banned?
     
  7. Unread #4 - Apr 21, 2008 at 7:41 PM
  8. Deacon Frost
    Joined:
    Jan 30, 2007
    Posts:
    2,905
    Referrals:
    3
    Sythe Gold:
    57

    Deacon Frost Grand Master
    Banned

    Deacon's WD Tutorials: Guide 1

    I don't wanna be too detailed yet. I'm thinking back to my days right now on what I had questions about.

    Also, the main focus is PHP, later on I'll do actual full web development and start pushing out the tutorials.


    (This one will also be marked up, and edited to be nicer and easier to read. But the information will stay pretty much the same.)


    ((Want me to write a (X)HTML and CSS tut?))
     
  9. Unread #5 - Apr 21, 2008 at 7:50 PM
  10. Brandeis
    Joined:
    Mar 9, 2007
    Posts:
    1,154
    Referrals:
    0
    Sythe Gold:
    0

    Brandeis AKA WoW Blows
    Banned

    Deacon's WD Tutorials: Guide 1

    You don't need to write a separate tutorial, just elaborate a bit more on each of them inside this one a bit more.
     
  11. Unread #6 - Apr 21, 2008 at 7:52 PM
  12. Deacon Frost
    Joined:
    Jan 30, 2007
    Posts:
    2,905
    Referrals:
    3
    Sythe Gold:
    57

    Deacon Frost Grand Master
    Banned

    Deacon's WD Tutorials: Guide 1

    alright, I'll go into em each. Look for version 2 tomorrow then.
     
  13. Unread #7 - Apr 23, 2008 at 12:24 AM
  14. TDD
    Joined:
    Nov 20, 2005
    Posts:
    3,191
    Referrals:
    2
    Sythe Gold:
    0

    TDD Web Design Expert
    Do Not Trade

    Deacon's WD Tutorials: Guide 1

    JS has its uses.

    I'd be demanding to read it before it gets accepted than.
     
  15. Unread #8 - Apr 23, 2008 at 12:40 AM
  16. Deacon Frost
    Joined:
    Jan 30, 2007
    Posts:
    2,905
    Referrals:
    3
    Sythe Gold:
    57

    Deacon Frost Grand Master
    Banned

    Deacon's WD Tutorials: Guide 1

    I was actually gonna write a crappy beginners guide.

    I can't do CSS like you, you know that.

    Plus my XHTML doesn't validate less I spend hours on it.
     
  17. Unread #9 - May 1, 2008 at 10:53 AM
  18. Byrdman--1-7
    Joined:
    May 1, 2008
    Posts:
    59
    Referrals:
    0
    Sythe Gold:
    0

    Byrdman--1-7 Member
    Banned

    Deacon's WD Tutorials: Guide 1

    This helped me thanks
     
  19. Unread #10 - May 3, 2008 at 11:15 AM
  20. Solid tank
    Joined:
    Mar 9, 2007
    Posts:
    1,614
    Referrals:
    0
    Sythe Gold:
    0

    Solid tank Guru of Ganja
    $5 USD Donor Retired Sectional Moderator

    Deacon's WD Tutorials: Guide 1

    Holy fucking shit. You're back.

    <3

    Also great guide, helped alot :)
     
  21. Unread #11 - Aug 30, 2008 at 3:17 PM
  22. joking
    Joined:
    Nov 9, 2007
    Posts:
    736
    Referrals:
    3
    Sythe Gold:
    0

    joking Apprentice
    Do Not Trade

    Deacon's WD Tutorials: Guide 1

    great guide well put together
     
  23. Unread #12 - Nov 3, 2008 at 4:08 PM
  24. Noob!
    Joined:
    Aug 29, 2008
    Posts:
    322
    Referrals:
    0
    Sythe Gold:
    0

    Noob! Forum Addict
    Banned

    Deacon's WD Tutorials: Guide 1

    very nice! 10/10
     
  25. Unread #13 - Nov 12, 2008 at 2:33 PM
  26. Chad.Gomes
    Joined:
    Oct 29, 2008
    Posts:
    140
    Referrals:
    0
    Sythe Gold:
    0

    Chad.Gomes Active Member
    Banned

    Deacon's WD Tutorials: Guide 1

    very basic guide, but well written 8/10
     
  27. Unread #14 - Nov 13, 2008 at 1:20 AM
  28. Josh*
    Referrals:
    0

    Josh* Guest

    Deacon's WD Tutorials: Guide 1

    i like it :) 8/10
     
  29. Unread #15 - Nov 13, 2008 at 2:29 AM
  30. Tru3 Mast3r
    Joined:
    Nov 12, 2008
    Posts:
    401
    Referrals:
    0
    Sythe Gold:
    0

    Tru3 Mast3r Forum Addict
    Do Not Trade

    Deacon's WD Tutorials: Guide 1

    7/10

    very use full, could go more in depth a little, and add some color to keep it from looking dull, but all in all i liked it.
     
  31. Unread #16 - Nov 16, 2008 at 7:44 PM
  32. LoganHirst
    Joined:
    Dec 27, 2007
    Posts:
    411
    Referrals:
    2
    Sythe Gold:
    0

    LoganHirst Forum Addict

    Deacon's WD Tutorials: Guide 1

    good starter guide
     
  33. Unread #17 - Dec 12, 2008 at 4:47 PM
  34. C L U B P K
    Joined:
    Dec 12, 2008
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    C L U B P K Newcomer

    Deacon's WD Tutorials: Guide 1

    nice tut thankss :)
     
< A Guide To Basic HTML...Newbie friendly! | >

Users viewing this thread
1 guest


 
 
Adblock breaks this site