<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[The Hallow Life - All Forums]]></title>
		<link>http://thehallowlife.com/forums/</link>
		<description><![CDATA[The Hallow Life - http://thehallowlife.com/forums]]></description>
		<pubDate>Sat, 19 May 2012 22:03:44 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Kewlz in the house]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1695</link>
			<pubDate>Wed, 02 May 2012 03:50:34 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1695</guid>
			<description><![CDATA[Hello guys, I'm Kewlz. <br />
Some of you may know me, or maybe not. I just came to check out the game. Will download soon.]]></description>
			<content:encoded><![CDATA[Hello guys, I'm Kewlz. <br />
Some of you may know me, or maybe not. I just came to check out the game. Will download soon.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Groups Tab now opened.]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1692</link>
			<pubDate>Wed, 11 Apr 2012 02:01:15 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1692</guid>
			<description><![CDATA[THL, <br />
<br />
I've now opened the tab "groups" for those who like to make clans, crews, <br />
groups, guilds, ...what have you. You can find the FID here: <br />
<a href="http://thehallowlife.com/forums/forumdisplay.php?fid=120" target="_blank">http://thehallowlife.com/forums/forumdis...hp?fid=120</a><br />
<br />
Remember, for the official groups request. I'm allowing up to 7 groups at this<br />
current time. .-.<br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[THL, <br />
<br />
I've now opened the tab "groups" for those who like to make clans, crews, <br />
groups, guilds, ...what have you. You can find the FID here: <br />
<a href="http://thehallowlife.com/forums/forumdisplay.php?fid=120" target="_blank">http://thehallowlife.com/forums/forumdis...hp?fid=120</a><br />
<br />
Remember, for the official groups request. I'm allowing up to 7 groups at this<br />
current time. .-.<br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[IMPORTANT] Groups now accepted!]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1690</link>
			<pubDate>Fri, 06 Apr 2012 03:02:04 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1690</guid>
			<description><![CDATA[THL, <br />
<br />
Alright, for a short time, I'll be allowing groups. There are however a few stipulations. <br />
<br />
For one, PM me by clicking on the "Group Request PM" link below. Thanks.<br />
----<br />
<a href="http://thehallowlife.com/forums//private.php?action=send&uid=1&subject=Group%20Request&message=Hello,%20I'd%20like%20to%20have%20a%20group%20created.%20Below%20is%20my&#8203;%20forum%20description,%20forum%20icon,%20userbar,%20and%20a%20short%20descripti&#8203;on%20of%20what%20the%20group%20is%20about.%20Please%20get%20back%20to%20me%20soo&#8203;n.%20Thanks." target="_blank">Group Request PM</a><br />
----<br />
<br />
What a group is? A group is a number of people who band together on a <br />
forum to do what they'd like. <br />
<br />
What you will get? <br />
<br />
Your own sub forum. You will be made leader of said subforum, you can add<br />
anyone else you'd like as leader, you can have as many members as you'd like. You will be allowed your own user bar, which you can set as your display group. You will be allowed your own Ficon (Forum Icon -- The image next to the sub forum). <br />
<br />
These are free for a limited time, and will eventually become a paid group only process. <br />
You are encouraged to become a rare group now, rather than later.<br />
However there are some rules and stipulations. All of which, will be covered<br />
if your group request is accepted. <br />
<br />
-----<br />
<br />
I do hope to see some High Quality groups around here. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[THL, <br />
<br />
Alright, for a short time, I'll be allowing groups. There are however a few stipulations. <br />
<br />
For one, PM me by clicking on the "Group Request PM" link below. Thanks.<br />
----<br />
<a href="http://thehallowlife.com/forums//private.php?action=send&uid=1&subject=Group%20Request&message=Hello,%20I'd%20like%20to%20have%20a%20group%20created.%20Below%20is%20my&#8203;%20forum%20description,%20forum%20icon,%20userbar,%20and%20a%20short%20descripti&#8203;on%20of%20what%20the%20group%20is%20about.%20Please%20get%20back%20to%20me%20soo&#8203;n.%20Thanks." target="_blank">Group Request PM</a><br />
----<br />
<br />
What a group is? A group is a number of people who band together on a <br />
forum to do what they'd like. <br />
<br />
What you will get? <br />
<br />
Your own sub forum. You will be made leader of said subforum, you can add<br />
anyone else you'd like as leader, you can have as many members as you'd like. You will be allowed your own user bar, which you can set as your display group. You will be allowed your own Ficon (Forum Icon -- The image next to the sub forum). <br />
<br />
These are free for a limited time, and will eventually become a paid group only process. <br />
You are encouraged to become a rare group now, rather than later.<br />
However there are some rules and stipulations. All of which, will be covered<br />
if your group request is accepted. <br />
<br />
-----<br />
<br />
I do hope to see some High Quality groups around here. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 15: Managing a server.]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1689</link>
			<pubDate>Thu, 05 Apr 2012 21:57:27 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1689</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1685" target="_blank">VWBC Side Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1686" target="_blank">VWBC Side Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1687" target="_blank">VWBC: Lesson 13</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1688" target="_blank">VWBC: Lesson 14</a><br />
----<br />
<br />
Alright welcome back to my class. Today we're going to be going over how to manager your server you just installed. Whether that server be a VPS (Virtual Private Server) or a dedicated server, we're going to map out some things needed to run and manage a server. <br />
The first thing we'll be going over is basic things we need to keep watch over. But don't fret we'll get into some commands you can use to help you manage your server. <br />
<br />
Now contrary to popular belief managing a Linux server is hard, it's actually pretty damn easy, so long as you understand the basics or the fundamentals of what you're doing or should be doing. But while it may be easy, there are TONS of things to do or keep in mind. There's system administration, networking, traffic control, protection/security, and oh god so much more. There is really just TOO much to put in to this one class, so I'll keep it relatively short today but add on more to it in later classes when we revisit this area. But for today we'll go over some basic administration. <br />
<br />
Some things to keep in mind when managing a server is Bandwidth, CPU Load, Disk Space, Processes, Protection...<br />
But because we're managing a web server we'll go over only the web basics for now and get into more in-depth system administration later. <br />
<br />
Why do we need to keep an eye on Bandwidth? Well mainly because bandwidth is more or less the rate of data transfer which is normally measured in bps (Bits Per Second). Now why is this so important? Let's say your server is configured to only handle up to 50MB of bandwidth. If you're running a web server and the traffic you receive is starting to exceed your bandwidth limit then you will no longer be able to handle anymore potential visitors and would start either throwing out errors or causing your newer visitors to see error pages like "Sorry, no longer can let you in I ran out of room." because essentially that what it is. Bandwidth is like "room" or...it's a "spots" in a room. Imagine for a minute that your server is actually a giant auditorium and while we're still imagining here, let's also say that a single chair is 1MB of bandwidth. So in this room you'll have 50 chairs. Now, let's say you started advertising your site and now all of the sudden you start getting vistors. Well, after the first 50 people come, what then? What do the rest do? That's right since they can't fit inside the room they leave. They were told by the server that there was no room and they're not welcome right now. They left a little angry. This is why it's important to be able to manage bandwidth. <br />
<br />
But exactly is managing it? Well that's a bit difficult to explain, because literally everything done on the web takes bandwidth from a server. Downloading things take up bandwidth, loading images or transferring text/data takes up bandwidth. Literally just pinging a server takes up bandwidth. Uploading takes up bandwidth, even something as simple as looking at the website takes up bandwidth. <br />
This is why it's so good to have LOTS of bandwidth (preferably unlimited). Some hosts will allow you unlimited bandwidth, which is awesome considering how important it is. But if you're hosting this off your own computer than your Bandwidth is only as much as your ISP will allow you. Unless you are your own ISP in this case, I don't know honestly. I've never been in a situation where I didn't have either a host or a home server. So remember, everything takes upi bandwidth. People visiting your site, people loading imagines people uploading or downloading, people pinging it, you uploading via FTP, people sending out mail from the server. Anything that is connected to the server via HTTP, SMTP, FTP and so on will take up your server's bandwidth. <br />
<br />
Another thing we need keep an eye on is CPU Load. Why? Because your server's hardware can only take so much command processing and data parsing before it decides to say "Hey, you know what? Screw this. I/m tired and over worked, I'm going to sleep". Take for instance your own computer. What happens if you run too many programs at once? Or use a program or two that is resource heavy like games? Right, the processor decides to shut down to protect itself. This would also occur from over heating as well, granted, but not my point. If a server starts to exceed a certain percentage of CPU Load a lot of hosts will just turn you off for a few minutes to let it cool down. If you own it yourself then I would suggest shutting it off yourself and letting it cool down. This is to protect your hardware and that's about it really. Just protect the hardware. There is no way to un-limit this restriction. Your CPU (Processor) can only handle so much. So it's a good thing to manage this. If it gets to a certain % just cut it off for now or learn to manage other things better so your processor doesn't get too over worked. An excessive amount of data traffic can cause it to have a heavy load, an excessive amount of cron jobs can cause it to overload, an excessive amount of commands or requests can cause it to overload. <br />
<br />
A simple DDoS attack via a web form can cause it to overload, so remember to keep an eye on your CPU load and not to let it go over (I would suggest 75%) it's limit lest you be having to turn off your server for a few minutes. Also because CPU's can be affected by heat and servers tend to heat up really fast, it's a good thing to have multiple fans running or to put inside a cold cold room to keep it cool. Like I said though, not much you can do to limit the amount of pressure on a CPU except by managing things like the amount of work it does (e.g. process data).<br />
<br />
Disk space. I'm sure everyone here will know what this is, but essentially it's the amount of room you have left on your server/web server. It's your hard drive. Think of your actual computer hard drive and how it gives you "space" to use. It's more or less the same thing. Why is this important? Because things like content need space to sit. Uploading your website files need space, your files, your clients files (if you have a client base like this), things like flat file databases if you use those. Normally having some odd terabyte is space is more than enough, you never know, for those big big sites or torrent sites. This is something I would rank lower on the list because it's easy to get more space, or manage it but it's still important to know that when managing a server you need to keep an eye on disk space. <br />
<br />
Processes. What is this? Well processes are exactly like the processes you see running in your task manager. Each processes takes up its own amount of memory and CPU load, so if you have too many processes, the CPU becomes over loaded. Each cron is a process to itself, each service, each program you have running is all processes. It's a good idea to manage the amount of processes you have running at a time. Normally you would have about 7-10 processes running at a time. But this can vary depending on the website or server. But because this ties into CPU load, and it causing the processor to overload and shut down, it's a good idea to keep this under watch to make sure it doesn't cause too much CPU % to be taken up. If it does start to happen, you can either close some processes out or suspend some processes to balance the load on the CPU. <br />
<br />
Protection. This is truly one of the greatest things you need to keep watch over. Many times have I seen a server suffer an attack in the many many forms I've seen in them. So consistently checking your logs for errors or attack vectors, can help reduce this or at least alert you to any potential problems. Things like using .htaccess, IP Tables, Cloudflare and so on are great for preventing a lot of attacks like DDoS. However this is only a small portion of what you can do to help you protect your website. Doing things like stripping tags and parsing data correctly can help protect your server from unwarranted attacks. But need not worry, when we get into the security series we'll cover this.<br />
<br />
Now, while this may have been a short class, let me go ahead and give you a few commands you can do, to help manage your server. <br />
<br />
<span style="color: #98FB98;">df -h</span> ::: <span style="color: #FFFFE0;">How much hard disk space you have on each mounted file system.</span><br />
<br />
<span style="color: #98FB98;">netstat</span><br />
<span style="color: #98FB98;">netstat |head</span><br />
<span style="color: #98FB98;">netstat -r</span> ::: <span style="color: #FFFFE0;">Network connections and status of sockets (For all 3 netstat commands above)</span><br />
<br />
<span style="color: #98FB98;">nslookup DOMAIN</span> <span style="color: #87CEEB;">(e.g.: nslookup this.domain.com)</span> ::: <span style="color: #FFFFE0;">Checks the domain name and IP information of a server</span><br />
<br />
<span style="color: #98FB98;">ps</span><br />
<span style="color: #98FB98;">ps -A |more</span> ::: <span style="color: #FFFFE0;">Lists all processes on the server</span><br />
<br />
<span style="color: #98FB98;">route -v</span> ::: <span style="color: #FFFFE0;">Almost exactly like Netstat actually, some people just prefer using this command. </span><br />
<br />
<span style="color: #98FB98;">top</span> ::: <span style="color: #FFFFE0;">Displays system statistics and details about your server's active processes</span><br />
<br />
<span style="color: #98FB98;">who</span> ::: <span style="color: #FFFFE0;">Displays details of all users currently on the server</span><br />
<br />
And that about does it for the commands. Your homework for this class is simply to fire up that VPS/Server with Ubuntu on it and run these<br />
commands on your server to see the interesting things they do. The best way to understand a command is not to read them but to use them. <br />
So post backs with your results or pictures. Either is fine. Next class we'll be doing a fun review. (Well fun if I can make it so. After that we'll be<br />
going into SQL to manage our DB systems. )<br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1685" target="_blank">VWBC Side Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1686" target="_blank">VWBC Side Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1687" target="_blank">VWBC: Lesson 13</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1688" target="_blank">VWBC: Lesson 14</a><br />
----<br />
<br />
Alright welcome back to my class. Today we're going to be going over how to manager your server you just installed. Whether that server be a VPS (Virtual Private Server) or a dedicated server, we're going to map out some things needed to run and manage a server. <br />
The first thing we'll be going over is basic things we need to keep watch over. But don't fret we'll get into some commands you can use to help you manage your server. <br />
<br />
Now contrary to popular belief managing a Linux server is hard, it's actually pretty damn easy, so long as you understand the basics or the fundamentals of what you're doing or should be doing. But while it may be easy, there are TONS of things to do or keep in mind. There's system administration, networking, traffic control, protection/security, and oh god so much more. There is really just TOO much to put in to this one class, so I'll keep it relatively short today but add on more to it in later classes when we revisit this area. But for today we'll go over some basic administration. <br />
<br />
Some things to keep in mind when managing a server is Bandwidth, CPU Load, Disk Space, Processes, Protection...<br />
But because we're managing a web server we'll go over only the web basics for now and get into more in-depth system administration later. <br />
<br />
Why do we need to keep an eye on Bandwidth? Well mainly because bandwidth is more or less the rate of data transfer which is normally measured in bps (Bits Per Second). Now why is this so important? Let's say your server is configured to only handle up to 50MB of bandwidth. If you're running a web server and the traffic you receive is starting to exceed your bandwidth limit then you will no longer be able to handle anymore potential visitors and would start either throwing out errors or causing your newer visitors to see error pages like "Sorry, no longer can let you in I ran out of room." because essentially that what it is. Bandwidth is like "room" or...it's a "spots" in a room. Imagine for a minute that your server is actually a giant auditorium and while we're still imagining here, let's also say that a single chair is 1MB of bandwidth. So in this room you'll have 50 chairs. Now, let's say you started advertising your site and now all of the sudden you start getting vistors. Well, after the first 50 people come, what then? What do the rest do? That's right since they can't fit inside the room they leave. They were told by the server that there was no room and they're not welcome right now. They left a little angry. This is why it's important to be able to manage bandwidth. <br />
<br />
But exactly is managing it? Well that's a bit difficult to explain, because literally everything done on the web takes bandwidth from a server. Downloading things take up bandwidth, loading images or transferring text/data takes up bandwidth. Literally just pinging a server takes up bandwidth. Uploading takes up bandwidth, even something as simple as looking at the website takes up bandwidth. <br />
This is why it's so good to have LOTS of bandwidth (preferably unlimited). Some hosts will allow you unlimited bandwidth, which is awesome considering how important it is. But if you're hosting this off your own computer than your Bandwidth is only as much as your ISP will allow you. Unless you are your own ISP in this case, I don't know honestly. I've never been in a situation where I didn't have either a host or a home server. So remember, everything takes upi bandwidth. People visiting your site, people loading imagines people uploading or downloading, people pinging it, you uploading via FTP, people sending out mail from the server. Anything that is connected to the server via HTTP, SMTP, FTP and so on will take up your server's bandwidth. <br />
<br />
Another thing we need keep an eye on is CPU Load. Why? Because your server's hardware can only take so much command processing and data parsing before it decides to say "Hey, you know what? Screw this. I/m tired and over worked, I'm going to sleep". Take for instance your own computer. What happens if you run too many programs at once? Or use a program or two that is resource heavy like games? Right, the processor decides to shut down to protect itself. This would also occur from over heating as well, granted, but not my point. If a server starts to exceed a certain percentage of CPU Load a lot of hosts will just turn you off for a few minutes to let it cool down. If you own it yourself then I would suggest shutting it off yourself and letting it cool down. This is to protect your hardware and that's about it really. Just protect the hardware. There is no way to un-limit this restriction. Your CPU (Processor) can only handle so much. So it's a good thing to manage this. If it gets to a certain % just cut it off for now or learn to manage other things better so your processor doesn't get too over worked. An excessive amount of data traffic can cause it to have a heavy load, an excessive amount of cron jobs can cause it to overload, an excessive amount of commands or requests can cause it to overload. <br />
<br />
A simple DDoS attack via a web form can cause it to overload, so remember to keep an eye on your CPU load and not to let it go over (I would suggest 75%) it's limit lest you be having to turn off your server for a few minutes. Also because CPU's can be affected by heat and servers tend to heat up really fast, it's a good thing to have multiple fans running or to put inside a cold cold room to keep it cool. Like I said though, not much you can do to limit the amount of pressure on a CPU except by managing things like the amount of work it does (e.g. process data).<br />
<br />
Disk space. I'm sure everyone here will know what this is, but essentially it's the amount of room you have left on your server/web server. It's your hard drive. Think of your actual computer hard drive and how it gives you "space" to use. It's more or less the same thing. Why is this important? Because things like content need space to sit. Uploading your website files need space, your files, your clients files (if you have a client base like this), things like flat file databases if you use those. Normally having some odd terabyte is space is more than enough, you never know, for those big big sites or torrent sites. This is something I would rank lower on the list because it's easy to get more space, or manage it but it's still important to know that when managing a server you need to keep an eye on disk space. <br />
<br />
Processes. What is this? Well processes are exactly like the processes you see running in your task manager. Each processes takes up its own amount of memory and CPU load, so if you have too many processes, the CPU becomes over loaded. Each cron is a process to itself, each service, each program you have running is all processes. It's a good idea to manage the amount of processes you have running at a time. Normally you would have about 7-10 processes running at a time. But this can vary depending on the website or server. But because this ties into CPU load, and it causing the processor to overload and shut down, it's a good idea to keep this under watch to make sure it doesn't cause too much CPU % to be taken up. If it does start to happen, you can either close some processes out or suspend some processes to balance the load on the CPU. <br />
<br />
Protection. This is truly one of the greatest things you need to keep watch over. Many times have I seen a server suffer an attack in the many many forms I've seen in them. So consistently checking your logs for errors or attack vectors, can help reduce this or at least alert you to any potential problems. Things like using .htaccess, IP Tables, Cloudflare and so on are great for preventing a lot of attacks like DDoS. However this is only a small portion of what you can do to help you protect your website. Doing things like stripping tags and parsing data correctly can help protect your server from unwarranted attacks. But need not worry, when we get into the security series we'll cover this.<br />
<br />
Now, while this may have been a short class, let me go ahead and give you a few commands you can do, to help manage your server. <br />
<br />
<span style="color: #98FB98;">df -h</span> ::: <span style="color: #FFFFE0;">How much hard disk space you have on each mounted file system.</span><br />
<br />
<span style="color: #98FB98;">netstat</span><br />
<span style="color: #98FB98;">netstat |head</span><br />
<span style="color: #98FB98;">netstat -r</span> ::: <span style="color: #FFFFE0;">Network connections and status of sockets (For all 3 netstat commands above)</span><br />
<br />
<span style="color: #98FB98;">nslookup DOMAIN</span> <span style="color: #87CEEB;">(e.g.: nslookup this.domain.com)</span> ::: <span style="color: #FFFFE0;">Checks the domain name and IP information of a server</span><br />
<br />
<span style="color: #98FB98;">ps</span><br />
<span style="color: #98FB98;">ps -A |more</span> ::: <span style="color: #FFFFE0;">Lists all processes on the server</span><br />
<br />
<span style="color: #98FB98;">route -v</span> ::: <span style="color: #FFFFE0;">Almost exactly like Netstat actually, some people just prefer using this command. </span><br />
<br />
<span style="color: #98FB98;">top</span> ::: <span style="color: #FFFFE0;">Displays system statistics and details about your server's active processes</span><br />
<br />
<span style="color: #98FB98;">who</span> ::: <span style="color: #FFFFE0;">Displays details of all users currently on the server</span><br />
<br />
And that about does it for the commands. Your homework for this class is simply to fire up that VPS/Server with Ubuntu on it and run these<br />
commands on your server to see the interesting things they do. The best way to understand a command is not to read them but to use them. <br />
So post backs with your results or pictures. Either is fine. Next class we'll be doing a fun review. (Well fun if I can make it so. After that we'll be<br />
going into SQL to manage our DB systems. )<br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 14: Installing and setting up a server.]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1688</link>
			<pubDate>Thu, 05 Apr 2012 21:55:16 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1688</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1685" target="_blank">VWBC Side Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1686" target="_blank">VWBC Side Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1687" target="_blank">VWBC: Lesson 13</a><br />
----<br />
<br />
(If I randomly go from short length sentences to long, I apologize. I'm trying to cut back on that a little).<br />
<br />
So now that we have gotten some basic server stuff down such as misconceptions and cleared the air of just a little of what can be expected let's move on to actually installing a server. However, first, I think I'd like to go over a couple things. Before we begin I'm going to tell you the difference between a Server and a VPS. And then I'll show you to install both of them along with a few tweaks you can do post-installation. <br />
<br />
A server. What is a server exactly? A lot of people will tell you a server is a program that sends calls or information of some type to a client based application. This is true, however it is the wrong context of what a server is in this case. Some people will tell you a server is a machine. This is technically right, yet wrong. A server is actually just an OS (Operating System). "Wait, Viral....what are you talking about? I thought an OS was just some software to let you play games and browse the internet?". Well...yes, it is. However an OS is also a server. Think for a minute, about the OS named Ubuntu Server, or the OS named Mac OS Lion Server. <br />
<br />
Is they are OSes, why were they named servers? Correct, because a server is more accurately a Machine AND OS running in tandem to create place for you to work and let others view your works. The machine part works the part of fitting the requirements for hosting the OS and keeping it (partially) safe. It also has the job of holding all the data it will be providing and relaying. A OS is responsible for creating that data, relaying the data and staying (partially) safe. It also has the job of being able to call the data stored on the machine itself. <br />
<br />
An OS is software, yes. But it's more than just software it's normally the front end (GUI) of a machine for people to use. What allows you to use your computer right now, without having any knowledge in programming or computer skills is the GUI or the front end of the OS. A lot if not most, server OSes come without a GUI and only accept command line argument/commands. <br />
<br />
A machine is what stores the data. Your computer, right now, is holding all your data. When you download stuff like programs or movies, those have to be stored somewhere, right? So where does it go? Yeah your computer's hard drive (what holds information and calls it/relays it) is what holds the data. It puts it there in this tiny container waiting for you to call it back out. It's what lets your OS run and allow you to play on it. <br />
However, I should stop it there, otherwise I will be going on for hours about computers and that's a whole another section I plan to get into later - no need to worry. <br />
<br />
So what is a server? A server is an Operating System (OS) and a machine working in tandem. It's not simply JUST a machine or an OS. <br />
---<br />
<br />
A VPS. Now, what is a VPS? A VPS stands for "Virtual Private Server". It is literally nothing but a "Virtual Machine" (VM). A VM is a piece of software which can run it's on independent OS. It can run it's own server software (e.g.: Server OS). It literally emulates a computer while on a computer. So it's a computer within a computer. That is it. Everything else<br />
is still the same except the amount of room you have, and the hardware specs. The hardware specs and room you have for information is still invoked from the parent computer (your actual machine). Everything else is emulated. This is the only difference. It is very possible to have hundreds of VPSes on the same computer running at the same time (so long as you set it up right and had the hardware requirements.)<br />
----<br />
<br />
So now we know what a Server is and what a VPS is. What's next? We're gonna install them of course. For this entire class I will be using Ubuntu 10.10 for VPS installation and I'll be using Ubuntu Server 10 for the machine OS since I'm currently looking at my CD for it. Lol. <br />
<br />
To start you'll want to burn the .iso file to a CD or DVD. When you've done so you'll then want to pop that into your CD tray on whatever computer you intended to run this on, and turn on the computer. NOTE: Make sure your hardware meets specifications for your OS intended. <br />
Now then, when you turn on the computer hit the "Esc" button which should bring up a menu with your hard driver name, CD name, and any other names of any other devices connected to it (such as a USB). Select CD from the list and hit enter to run the setup. When it finally loads, the installation itself should be pretty strait forward and not require much help from me - if any at all really. <br />
<br />
Your first screen is is just a language selection so it knows which one to install and what to communicate with you with. Next screen is an introduction/splash page screen. It should have 5 options: <br />
"Install Ubuntu Server", "Look for errors", "Test memory", "Boot from first Hard disk", "Rescue this OS". You'll just want to choose the first option and continue with the installation process. Now, next screen you'll be presented with yet another language screen (yay!) where you'll select the computer language. Next screen up you get to pick a country, woo. After choosing your country we'll go right to the next screen which is asking you for your keyboard layout. Now if you don't know it (and I don't expect you too) just select "No" for this option and move on. If you chose no, the next screen you get is a list of countries asking where the eff your keyboard is from. Choose your own country for this, and next screen choose the same option. For USA users, if you chose "USA" as the first choice, then choose the first choice it highlights which is just "USA" with nothing following it. <br />
<br />
Next screen we'll go into is host naming. It'll ask you to name your host machine. You can name this anything you'd like. Default name is Ubuntu, I myself will choose to name it "Viral's Class". After naming it what your heart desires, move to the next screen please. It'll ask you for the timezone. If it happens to guess it right on the first try, kudos to the computer. If not, just select no and it'll give you a list of timezones to choose from. Next screen is asking you to partition the disk. I will assume this is a clean install, (or overwrite of an old OS) and therefor we want to choose the option "Guided Install - Use my entire disk". If you DO NOT want to use the entire disk or this is not a clean install, choose manual to select your partition size and name. However, it is much easier to make a clean install and not have to worry about it. <br />
<br />
Now, next screen you're presented with is asking you which hard drive to install it too. Choose the right one, (should be the only option unless you have multiple hard drives connected - e.g.: external HD's; unplug all of them before doing this install.) <br />
<br />
Now next screen you get presented with is asking you if you're sure of every option. Select yes and it will finalize the installation. Next screen will ask you how much space you wish to partition for this installation. You can set any amount. If you're going to host a website on this machine, like I assume then choose all of it. If you are going to use this machine as a signalized OS, then choose all of it. I myself personally chose 100GB for this machine because I dual boot Red Hat Linux on here. <br />
I run a web server from this machine as well, so I'm going to need more room for later. But more on that at a later time. <br />
Next screen is asking you to confirm everything. Just select yes. Ahh finally, almost done. It'll now ask you to setup a username and password. DO NOT FORGET THESE. <br />
<br />
Once you have done so, it'll bring you to a screen which may seem confusing to you. It's asking you if you want to encrypt your hard disk. WAIT, before you hit yes. I'm going to select no to keep it simple, but it's basically saying that it'll mount all your data when you login, and unmount all your data when you log out. This is to keep your files private in the event it is stolen or broken. Now while this seems like a good things, I recommend this only for advanced people and do note it's not all fun and games and comes with it's fair share of problems. Next screen will ask you if you'd like to use a proxy to access world wide web. Choose no, unless you seriously want to choose a proxy to run under. But note it will slow the network response time, and isn't really worth it in the end. Almost the last screen. Woo woo. <br />
<br />
Alright next screen is asking you about updates. You can choose any of the options you'd like, I myself personally chose the first option "Do not install any updates you crazy moron". And finally the next screen is important. <br />
<br />
Now, on this next screen if you plan to run a web server, or host a website or host a private server for a game or whatever. Just any type of server (and I assume so since you chose "Ubuntu Server"?) then you'll want a LAMP setup. LAMP is just generally better for Linux systems like Ubuntu. You'll also want to install a Mail setup and a OpenSSH service. <br />
Mail is for setting up a mail server to allow  an email service of types for your server and OpenSSH is so you can manually login to your machine via SSH and run command line arguments from there without having to be at the machine personally. Neato right? There are a few other options you COULD choose, but these 3 are generally the most important for any type of web server or gaming server. I don't really recommend selecting any of the others except those 3. Also, to select the option, do not hit enter but rather bash the "Space Bar" with your head (Lol, it's a joke. Just tap it). Now finally, if you chose the LAMP setup, it'll ask you for a MySQL password and a confirmation password. DO NOT FORGET THIS PASSWORD, for the love of God, don't. When you do confirm it and it install MySQL. It'll give you a new screen, asking you to select an internet type site. Just choose the second option "Internet Site". It'll tell you that it sends mail via SMTP, but we don't care right now. If you're using a mail server, it'll now ask you the domain the mail comes from. You can choose your own domain, local domain, or just any made up one really. And lastly before final install, it'll ask you if you'd like to install grub. If you plan to have one OS and only OS, you can install grub. However, more than one and I wouldn't install it. <br />
<br />
Now that we have finally barreled through ALL of that stuff/junk. It'll finally give you the "finalize installation" screen by telling you to reboot the system. So go ahead and do so. Reboot the system. Once rebooted it'll ask you for your username. Log in with the details you provided earlier. And then it'll ask for a password. Note: the password will remain blank but you are actually type. This is a security measure against "wandering eyes". Once you have logged in it'll show you various updates and system loads. However you may notice something strange. <br />
<br />
Wait....Viral. WHAT THE FUCK? NO GUI? MY OS IS BROKEN! No...No it's not. That is how most servers will come. It is a GUI-less server, which allows you to run command line arguments/commands at your discretion, therefor it is HIGHLY recommended to know at least some basic Linux commands such as apt-get and sudo. <br />
<br />
Now for a VPS. If you bought a VPS from a host provider, like say Host Gator, Burstnet, and so on the VPS comes with the OS already install and you can start running commands like sudo apt-get NAME right away. <br />
However, if you're using a VM to install this, then get Daemon Tools and mount the image to a virtual device and then in the VM open the mounted image from there, everything else is more or less the same. After you're done installing unmount the device from Daemon Tools. <br />
<br />
Here are a few tweaks for you. If you bought the VPS from a hostprovider, it, in most cases will NOT come with LAMP. So to install LAMP on your VPS simply go to the command line and run this command: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>sudo apt-get install lamp-server^</code></div></div>
. Copy this entire thing. Including the carrot symbol at the end. This should more or less install LAMP. If it does not, it is either a problem with the hosting provider, or you need to enable a few things first. <br />
<br />
If you're like me and would like to test to make sure Apache works then navigate to your locahost to see the test page. And then to test PHP do the following: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>sudo nano /var/www/testing.php</code></div></div>
 which will bring up a text editor with nothing in it. In that text editor, type in this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;?php phpinfo(); ?&gt;</code></div></div>
 after doing so, close out the text editor and restart Apache by doing the following: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>sudo /etc/init.d/apache2 restart</code></div></div>
. <br />
<br />
When you do so, navigate to your localhost and then to your directory of the php file in this case, localhost.com/testing.php. If it shows you a wife array of information, it means it worked. If not, something went wrong wtf? <br />
<br />
Next you'll want to bind the IP address to your localhost and MySQL DB. So for this we'll grep it. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>cat /etc/hosts | grep localhost</code></div></div>
 will show you the IP address that's being used. In most cases, this will say "127.0.0.1". If not, well weird but it's not uncommon. Next you'll want to bind this IP to your configuration file with this command: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>cat /etc/mysql/my.cnf | grep bind-address</code></div></div>
<br />
And last but not least, if you're like me and want a front end easy to use web manager for databases, we'll go ahead and install phpMyAdmin (NOTE: This does not come with a LAMP setup, so machine users will need to do this (and the above following as well)). <br />
Run this code: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>sudo apt-get install libapache2-mod-auth-mysql phpmyadmin</code></div></div>
. <br />
<br />
In the following prompts, the first will give you information. ignore it and select "Ok". Next prompt you will need to use SPACEBAR to choose the option "Apache2" NOT the other one. Next prompt is more information, just hit Enter. Use the Tab key to select "Yes" and move on. You'll be prompted to enter the MySQL root username and password from earlier. Input the correct details. And now to test if it works, go to localhost/phpmyadmin/. If does then you can login with root name and password you provided just a minute ago. <br />
====<br />
<br />
Ahh, now that is all for this class. I've already made it ridiculously long, and I fear I may hit the post limit. Next class will be entertaining too, I promise. (I hope I can make it so, anyway. )<br />
<br />
I would hope however you decide to choose a machine instead of a VPS by a hosting provider. I tell you this because it's much easier to manage, its safer, it's just generally cooler and you don't need to worry about pesky hosting providers getting your information or charging you monthly. ._. <br />
<br />
Till next time, <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1685" target="_blank">VWBC Side Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1686" target="_blank">VWBC Side Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1687" target="_blank">VWBC: Lesson 13</a><br />
----<br />
<br />
(If I randomly go from short length sentences to long, I apologize. I'm trying to cut back on that a little).<br />
<br />
So now that we have gotten some basic server stuff down such as misconceptions and cleared the air of just a little of what can be expected let's move on to actually installing a server. However, first, I think I'd like to go over a couple things. Before we begin I'm going to tell you the difference between a Server and a VPS. And then I'll show you to install both of them along with a few tweaks you can do post-installation. <br />
<br />
A server. What is a server exactly? A lot of people will tell you a server is a program that sends calls or information of some type to a client based application. This is true, however it is the wrong context of what a server is in this case. Some people will tell you a server is a machine. This is technically right, yet wrong. A server is actually just an OS (Operating System). "Wait, Viral....what are you talking about? I thought an OS was just some software to let you play games and browse the internet?". Well...yes, it is. However an OS is also a server. Think for a minute, about the OS named Ubuntu Server, or the OS named Mac OS Lion Server. <br />
<br />
Is they are OSes, why were they named servers? Correct, because a server is more accurately a Machine AND OS running in tandem to create place for you to work and let others view your works. The machine part works the part of fitting the requirements for hosting the OS and keeping it (partially) safe. It also has the job of holding all the data it will be providing and relaying. A OS is responsible for creating that data, relaying the data and staying (partially) safe. It also has the job of being able to call the data stored on the machine itself. <br />
<br />
An OS is software, yes. But it's more than just software it's normally the front end (GUI) of a machine for people to use. What allows you to use your computer right now, without having any knowledge in programming or computer skills is the GUI or the front end of the OS. A lot if not most, server OSes come without a GUI and only accept command line argument/commands. <br />
<br />
A machine is what stores the data. Your computer, right now, is holding all your data. When you download stuff like programs or movies, those have to be stored somewhere, right? So where does it go? Yeah your computer's hard drive (what holds information and calls it/relays it) is what holds the data. It puts it there in this tiny container waiting for you to call it back out. It's what lets your OS run and allow you to play on it. <br />
However, I should stop it there, otherwise I will be going on for hours about computers and that's a whole another section I plan to get into later - no need to worry. <br />
<br />
So what is a server? A server is an Operating System (OS) and a machine working in tandem. It's not simply JUST a machine or an OS. <br />
---<br />
<br />
A VPS. Now, what is a VPS? A VPS stands for "Virtual Private Server". It is literally nothing but a "Virtual Machine" (VM). A VM is a piece of software which can run it's on independent OS. It can run it's own server software (e.g.: Server OS). It literally emulates a computer while on a computer. So it's a computer within a computer. That is it. Everything else<br />
is still the same except the amount of room you have, and the hardware specs. The hardware specs and room you have for information is still invoked from the parent computer (your actual machine). Everything else is emulated. This is the only difference. It is very possible to have hundreds of VPSes on the same computer running at the same time (so long as you set it up right and had the hardware requirements.)<br />
----<br />
<br />
So now we know what a Server is and what a VPS is. What's next? We're gonna install them of course. For this entire class I will be using Ubuntu 10.10 for VPS installation and I'll be using Ubuntu Server 10 for the machine OS since I'm currently looking at my CD for it. Lol. <br />
<br />
To start you'll want to burn the .iso file to a CD or DVD. When you've done so you'll then want to pop that into your CD tray on whatever computer you intended to run this on, and turn on the computer. NOTE: Make sure your hardware meets specifications for your OS intended. <br />
Now then, when you turn on the computer hit the "Esc" button which should bring up a menu with your hard driver name, CD name, and any other names of any other devices connected to it (such as a USB). Select CD from the list and hit enter to run the setup. When it finally loads, the installation itself should be pretty strait forward and not require much help from me - if any at all really. <br />
<br />
Your first screen is is just a language selection so it knows which one to install and what to communicate with you with. Next screen is an introduction/splash page screen. It should have 5 options: <br />
"Install Ubuntu Server", "Look for errors", "Test memory", "Boot from first Hard disk", "Rescue this OS". You'll just want to choose the first option and continue with the installation process. Now, next screen you'll be presented with yet another language screen (yay!) where you'll select the computer language. Next screen up you get to pick a country, woo. After choosing your country we'll go right to the next screen which is asking you for your keyboard layout. Now if you don't know it (and I don't expect you too) just select "No" for this option and move on. If you chose no, the next screen you get is a list of countries asking where the eff your keyboard is from. Choose your own country for this, and next screen choose the same option. For USA users, if you chose "USA" as the first choice, then choose the first choice it highlights which is just "USA" with nothing following it. <br />
<br />
Next screen we'll go into is host naming. It'll ask you to name your host machine. You can name this anything you'd like. Default name is Ubuntu, I myself will choose to name it "Viral's Class". After naming it what your heart desires, move to the next screen please. It'll ask you for the timezone. If it happens to guess it right on the first try, kudos to the computer. If not, just select no and it'll give you a list of timezones to choose from. Next screen is asking you to partition the disk. I will assume this is a clean install, (or overwrite of an old OS) and therefor we want to choose the option "Guided Install - Use my entire disk". If you DO NOT want to use the entire disk or this is not a clean install, choose manual to select your partition size and name. However, it is much easier to make a clean install and not have to worry about it. <br />
<br />
Now, next screen you're presented with is asking you which hard drive to install it too. Choose the right one, (should be the only option unless you have multiple hard drives connected - e.g.: external HD's; unplug all of them before doing this install.) <br />
<br />
Now next screen you get presented with is asking you if you're sure of every option. Select yes and it will finalize the installation. Next screen will ask you how much space you wish to partition for this installation. You can set any amount. If you're going to host a website on this machine, like I assume then choose all of it. If you are going to use this machine as a signalized OS, then choose all of it. I myself personally chose 100GB for this machine because I dual boot Red Hat Linux on here. <br />
I run a web server from this machine as well, so I'm going to need more room for later. But more on that at a later time. <br />
Next screen is asking you to confirm everything. Just select yes. Ahh finally, almost done. It'll now ask you to setup a username and password. DO NOT FORGET THESE. <br />
<br />
Once you have done so, it'll bring you to a screen which may seem confusing to you. It's asking you if you want to encrypt your hard disk. WAIT, before you hit yes. I'm going to select no to keep it simple, but it's basically saying that it'll mount all your data when you login, and unmount all your data when you log out. This is to keep your files private in the event it is stolen or broken. Now while this seems like a good things, I recommend this only for advanced people and do note it's not all fun and games and comes with it's fair share of problems. Next screen will ask you if you'd like to use a proxy to access world wide web. Choose no, unless you seriously want to choose a proxy to run under. But note it will slow the network response time, and isn't really worth it in the end. Almost the last screen. Woo woo. <br />
<br />
Alright next screen is asking you about updates. You can choose any of the options you'd like, I myself personally chose the first option "Do not install any updates you crazy moron". And finally the next screen is important. <br />
<br />
Now, on this next screen if you plan to run a web server, or host a website or host a private server for a game or whatever. Just any type of server (and I assume so since you chose "Ubuntu Server"?) then you'll want a LAMP setup. LAMP is just generally better for Linux systems like Ubuntu. You'll also want to install a Mail setup and a OpenSSH service. <br />
Mail is for setting up a mail server to allow  an email service of types for your server and OpenSSH is so you can manually login to your machine via SSH and run command line arguments from there without having to be at the machine personally. Neato right? There are a few other options you COULD choose, but these 3 are generally the most important for any type of web server or gaming server. I don't really recommend selecting any of the others except those 3. Also, to select the option, do not hit enter but rather bash the "Space Bar" with your head (Lol, it's a joke. Just tap it). Now finally, if you chose the LAMP setup, it'll ask you for a MySQL password and a confirmation password. DO NOT FORGET THIS PASSWORD, for the love of God, don't. When you do confirm it and it install MySQL. It'll give you a new screen, asking you to select an internet type site. Just choose the second option "Internet Site". It'll tell you that it sends mail via SMTP, but we don't care right now. If you're using a mail server, it'll now ask you the domain the mail comes from. You can choose your own domain, local domain, or just any made up one really. And lastly before final install, it'll ask you if you'd like to install grub. If you plan to have one OS and only OS, you can install grub. However, more than one and I wouldn't install it. <br />
<br />
Now that we have finally barreled through ALL of that stuff/junk. It'll finally give you the "finalize installation" screen by telling you to reboot the system. So go ahead and do so. Reboot the system. Once rebooted it'll ask you for your username. Log in with the details you provided earlier. And then it'll ask for a password. Note: the password will remain blank but you are actually type. This is a security measure against "wandering eyes". Once you have logged in it'll show you various updates and system loads. However you may notice something strange. <br />
<br />
Wait....Viral. WHAT THE FUCK? NO GUI? MY OS IS BROKEN! No...No it's not. That is how most servers will come. It is a GUI-less server, which allows you to run command line arguments/commands at your discretion, therefor it is HIGHLY recommended to know at least some basic Linux commands such as apt-get and sudo. <br />
<br />
Now for a VPS. If you bought a VPS from a host provider, like say Host Gator, Burstnet, and so on the VPS comes with the OS already install and you can start running commands like sudo apt-get NAME right away. <br />
However, if you're using a VM to install this, then get Daemon Tools and mount the image to a virtual device and then in the VM open the mounted image from there, everything else is more or less the same. After you're done installing unmount the device from Daemon Tools. <br />
<br />
Here are a few tweaks for you. If you bought the VPS from a hostprovider, it, in most cases will NOT come with LAMP. So to install LAMP on your VPS simply go to the command line and run this command: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>sudo apt-get install lamp-server^</code></div></div>
. Copy this entire thing. Including the carrot symbol at the end. This should more or less install LAMP. If it does not, it is either a problem with the hosting provider, or you need to enable a few things first. <br />
<br />
If you're like me and would like to test to make sure Apache works then navigate to your locahost to see the test page. And then to test PHP do the following: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>sudo nano /var/www/testing.php</code></div></div>
 which will bring up a text editor with nothing in it. In that text editor, type in this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;?php phpinfo(); ?&gt;</code></div></div>
 after doing so, close out the text editor and restart Apache by doing the following: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>sudo /etc/init.d/apache2 restart</code></div></div>
. <br />
<br />
When you do so, navigate to your localhost and then to your directory of the php file in this case, localhost.com/testing.php. If it shows you a wife array of information, it means it worked. If not, something went wrong wtf? <br />
<br />
Next you'll want to bind the IP address to your localhost and MySQL DB. So for this we'll grep it. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>cat /etc/hosts | grep localhost</code></div></div>
 will show you the IP address that's being used. In most cases, this will say "127.0.0.1". If not, well weird but it's not uncommon. Next you'll want to bind this IP to your configuration file with this command: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>cat /etc/mysql/my.cnf | grep bind-address</code></div></div>
<br />
And last but not least, if you're like me and want a front end easy to use web manager for databases, we'll go ahead and install phpMyAdmin (NOTE: This does not come with a LAMP setup, so machine users will need to do this (and the above following as well)). <br />
Run this code: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>sudo apt-get install libapache2-mod-auth-mysql phpmyadmin</code></div></div>
. <br />
<br />
In the following prompts, the first will give you information. ignore it and select "Ok". Next prompt you will need to use SPACEBAR to choose the option "Apache2" NOT the other one. Next prompt is more information, just hit Enter. Use the Tab key to select "Yes" and move on. You'll be prompted to enter the MySQL root username and password from earlier. Input the correct details. And now to test if it works, go to localhost/phpmyadmin/. If does then you can login with root name and password you provided just a minute ago. <br />
====<br />
<br />
Ahh, now that is all for this class. I've already made it ridiculously long, and I fear I may hit the post limit. Next class will be entertaining too, I promise. (I hope I can make it so, anyway. )<br />
<br />
I would hope however you decide to choose a machine instead of a VPS by a hosting provider. I tell you this because it's much easier to manage, its safer, it's just generally cooler and you don't need to worry about pesky hosting providers getting your information or charging you monthly. ._. <br />
<br />
Till next time, <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 13: Server Basics]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1687</link>
			<pubDate>Thu, 05 Apr 2012 21:52:42 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1687</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1685" target="_blank">VWBC Side Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1686" target="_blank">VWBC Side Lesson 2</a><br />
----<br />
<br />
Ahh so today we get to more advanced stuff (well maybe not just yet<br />
but we're getting there, so congratz to those who've followed along and<br />
stuck it out with me long enough to reach this point). <br />
<br />
Today we're going to be going over some Server Basics. Essentially what I<br />
plan to teach here is the basics of a web server, how they work, what they <br />
do, how to install them, how to configure them, security, files, how to<br />
manage them and so on and so forth. So let's start off shall we. <br />
--<br />
<br />
A Server, is literally just a machine which can store up to good amount of <br />
data. Your personal computer, that you're sitting in front of right now, could<br />
be a web server if you set it up to be. And this is essentially what a server<br />
is. A computer with a eff load more memory/hard drive space than your<br />
typical computer you could get at Best Buy. <br />
<br />
Now before we progress, we should know how a computer works, however<br />
I'll leave that for another time and just blindly assume you know how a computer<br />
works. So if you do, then understanding how a server works, isn't much harder. <br />
<br />
Basically what a server does is this; Serves static content to a web browser. <br />
Yup. It basically serves content to a web browser for the user's enjoyment. <br />
So every time we browse the internet, find a website we want to look into<br />
and enjoy it's content, we are asking the server to fetch us some content. <br />
When it does it relays it back to us. <br />
<br />
Let's take for example this URL: <a href="http://hackforums.net/index.php" target="_blank">http://hackforums.net/index.php</a><br />
we can split this into 3 parts. "http://" "hackforums.net" and "index.php". <br />
The first part is how the web browser and the server communicate, that is<br />
via the Http (Hypertext Transfer Protocol), it then looks for the domain to<br />
serve files from (hackforums.net) and then looks for the local file we have requested<br />
which is index.php. <br />
<br />
When it finds index.php it then sends a ping back, with the information we<br />
requested and displays it for us, for our browser to read. <br />
A short diagram would look like this. <br />
<br />
Web browser -&gt; Server -&gt; File System -&gt; Server -&gt; Web browser. <br />
First the web browser sends the request. Then the server interprets it and<br />
sends a request to the file system. File system says "ok, lemme get that <br />
for you". And then sends it back to the server, who then sends it back to <br />
the web browser for the user to enjoy. <br />
---<br />
<br />
That is essentially the basics of how a web server works. At the core any<br />
way. A lot more back-end work goes on though. Honestly, I don't even know<br />
if I can get all the information out in 3 lessons. I may need to re-write<br />
that lesson plan. <br />
<br />
---<br />
<br />
Next thing you should know, is more or less, clearing up some misconceptions<br />
or commonly asked questions. I was going to list them, then answer them,<br />
but I think I'll do it as a bullet list instead for neater organization. <br />
<ul>
<span style="color: #87CEEB;"></li>
<li>Question: Is there a difference between a Windows Server and a Linux Server?</span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Yes. God Yes. We will cover this later though, keep reading down torward the end. </span><br />
<span style="color: #87CEEB;"></li>
<li>Question: Are there Mac Servers? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Yes. ...Though I do find it so incredibly rare to see them. There are Mac servers and I have seen them. </span><br />
<span style="color: #87CEEB;"></li>
<li>Question: How do I change content on a server? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: I'll cover this in management.</span><br />
<span style="color: #87CEEB;"></li>
<li>Question: How do I connect to the server? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Locally? Or if you're browsing the net? If locally, then just find you file system it's store on. If by the internet. Simply click on a link. Your browser will send a request.</span><br />
<span style="color: #87CEEB;"></li>
<li>Question: Whats this bout Linux and Window servers? I thought Apache was a server and Ngix?</span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Those are servers, but what I meant by servers is the OS they run on. All servers run on an OS. Apache is a linux oriented OS. </span><br />
<span style="color: #87CEEB;"></li>
<li>Question: So when you talk about servers, you mean weird mumbo jumbo like "LAMP, WAMP, WIMP" and stuff right? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Yes. And I'll cover those later too. </span><br />
<span style="color: #87CEEB;"></li>
<li>Question: Was this list made by using the list button? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Yes. Entirely. </span><br />
</li></ul>
<br />
Well, now that we've covered that, lets go over a few more things before <br />
calling this a day. <br />
<br />
In one of the questions, we mentioned linux and windows. Well this is <br />
because every server runs on an OS. Each server that you hear about or<br />
use, like Apache, is based on an OS. Windows and Linux are the main ones. <br />
<br />
What's the difference between them? Linux can run most any web page<br />
out there, however, not all software or webpages can run on linux. For<br />
example, ASP(x) can't run on Linux, because it needs access to microsoft <br />
access controls. Plesk can't run on Linux because it also uses M&#36; Access <br />
controls. <br />
<br />
Someone mentioned LAMP, WAMP and WIMP. These are short named <br />
acronyms for: <br />
<span style="font-weight: bold;">L</span>inux; <span style="font-weight: bold;">A</span>pache; <span style="font-weight: bold;">M</span>ySQL; <span style="font-weight: bold;">P</span>HP<br />
<span style="font-weight: bold;">W</span>indows; <span style="font-weight: bold;">A</span>pache; <span style="font-weight: bold;">M</span>sSQL; <span style="font-weight: bold;">P</span>HP<br />
<span style="font-weight: bold;">W</span>indows; <span style="font-weight: bold;">I</span>IS; <span style="font-weight: bold;">M</span>sSQL; <span style="font-weight: bold;">P</span>HP<br />
<span style="font-weight: bold;">W</span>indows; <span style="font-weight: bold;">I</span>IS; <span style="font-weight: bold;">M</span>sSQL; <span style="font-weight: bold;">A</span>sp<br />
<span style="font-weight: bold;">W</span>indows; <span style="font-weight: bold;">A</span>pache; <span style="font-weight: bold;">M</span>sSQL; <span style="font-weight: bold;">A</span>sp<br />
<br />
Those are the 5 most common set ups I've seen. Essentially the name comes<br />
from the first letter of every word. So in this regard you get LAMP, WAMP, <br />
WIMP, WAMA, and WIMA. <br />
But what about Xampp? Same thing really. <br />
---<br />
<br />
Now other than this, I'm not sure I want to cover it in this class. Perhaps<br />
next class. Where we'll learn to install servers, configure them, and then<br />
maybe also secure them (but that might be it's own section or go under<br />
management, we'll have to see. <br />
<br />
Thanks for viewing. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1685" target="_blank">VWBC Side Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1686" target="_blank">VWBC Side Lesson 2</a><br />
----<br />
<br />
Ahh so today we get to more advanced stuff (well maybe not just yet<br />
but we're getting there, so congratz to those who've followed along and<br />
stuck it out with me long enough to reach this point). <br />
<br />
Today we're going to be going over some Server Basics. Essentially what I<br />
plan to teach here is the basics of a web server, how they work, what they <br />
do, how to install them, how to configure them, security, files, how to<br />
manage them and so on and so forth. So let's start off shall we. <br />
--<br />
<br />
A Server, is literally just a machine which can store up to good amount of <br />
data. Your personal computer, that you're sitting in front of right now, could<br />
be a web server if you set it up to be. And this is essentially what a server<br />
is. A computer with a eff load more memory/hard drive space than your<br />
typical computer you could get at Best Buy. <br />
<br />
Now before we progress, we should know how a computer works, however<br />
I'll leave that for another time and just blindly assume you know how a computer<br />
works. So if you do, then understanding how a server works, isn't much harder. <br />
<br />
Basically what a server does is this; Serves static content to a web browser. <br />
Yup. It basically serves content to a web browser for the user's enjoyment. <br />
So every time we browse the internet, find a website we want to look into<br />
and enjoy it's content, we are asking the server to fetch us some content. <br />
When it does it relays it back to us. <br />
<br />
Let's take for example this URL: <a href="http://hackforums.net/index.php" target="_blank">http://hackforums.net/index.php</a><br />
we can split this into 3 parts. "http://" "hackforums.net" and "index.php". <br />
The first part is how the web browser and the server communicate, that is<br />
via the Http (Hypertext Transfer Protocol), it then looks for the domain to<br />
serve files from (hackforums.net) and then looks for the local file we have requested<br />
which is index.php. <br />
<br />
When it finds index.php it then sends a ping back, with the information we<br />
requested and displays it for us, for our browser to read. <br />
A short diagram would look like this. <br />
<br />
Web browser -&gt; Server -&gt; File System -&gt; Server -&gt; Web browser. <br />
First the web browser sends the request. Then the server interprets it and<br />
sends a request to the file system. File system says "ok, lemme get that <br />
for you". And then sends it back to the server, who then sends it back to <br />
the web browser for the user to enjoy. <br />
---<br />
<br />
That is essentially the basics of how a web server works. At the core any<br />
way. A lot more back-end work goes on though. Honestly, I don't even know<br />
if I can get all the information out in 3 lessons. I may need to re-write<br />
that lesson plan. <br />
<br />
---<br />
<br />
Next thing you should know, is more or less, clearing up some misconceptions<br />
or commonly asked questions. I was going to list them, then answer them,<br />
but I think I'll do it as a bullet list instead for neater organization. <br />
<ul>
<span style="color: #87CEEB;"></li>
<li>Question: Is there a difference between a Windows Server and a Linux Server?</span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Yes. God Yes. We will cover this later though, keep reading down torward the end. </span><br />
<span style="color: #87CEEB;"></li>
<li>Question: Are there Mac Servers? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Yes. ...Though I do find it so incredibly rare to see them. There are Mac servers and I have seen them. </span><br />
<span style="color: #87CEEB;"></li>
<li>Question: How do I change content on a server? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: I'll cover this in management.</span><br />
<span style="color: #87CEEB;"></li>
<li>Question: How do I connect to the server? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Locally? Or if you're browsing the net? If locally, then just find you file system it's store on. If by the internet. Simply click on a link. Your browser will send a request.</span><br />
<span style="color: #87CEEB;"></li>
<li>Question: Whats this bout Linux and Window servers? I thought Apache was a server and Ngix?</span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Those are servers, but what I meant by servers is the OS they run on. All servers run on an OS. Apache is a linux oriented OS. </span><br />
<span style="color: #87CEEB;"></li>
<li>Question: So when you talk about servers, you mean weird mumbo jumbo like "LAMP, WAMP, WIMP" and stuff right? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Yes. And I'll cover those later too. </span><br />
<span style="color: #87CEEB;"></li>
<li>Question: Was this list made by using the list button? </span><br />
<span style="color: #98FB98;"></li>
<li>Answer: Yes. Entirely. </span><br />
</li></ul>
<br />
Well, now that we've covered that, lets go over a few more things before <br />
calling this a day. <br />
<br />
In one of the questions, we mentioned linux and windows. Well this is <br />
because every server runs on an OS. Each server that you hear about or<br />
use, like Apache, is based on an OS. Windows and Linux are the main ones. <br />
<br />
What's the difference between them? Linux can run most any web page<br />
out there, however, not all software or webpages can run on linux. For<br />
example, ASP(x) can't run on Linux, because it needs access to microsoft <br />
access controls. Plesk can't run on Linux because it also uses M&#36; Access <br />
controls. <br />
<br />
Someone mentioned LAMP, WAMP and WIMP. These are short named <br />
acronyms for: <br />
<span style="font-weight: bold;">L</span>inux; <span style="font-weight: bold;">A</span>pache; <span style="font-weight: bold;">M</span>ySQL; <span style="font-weight: bold;">P</span>HP<br />
<span style="font-weight: bold;">W</span>indows; <span style="font-weight: bold;">A</span>pache; <span style="font-weight: bold;">M</span>sSQL; <span style="font-weight: bold;">P</span>HP<br />
<span style="font-weight: bold;">W</span>indows; <span style="font-weight: bold;">I</span>IS; <span style="font-weight: bold;">M</span>sSQL; <span style="font-weight: bold;">P</span>HP<br />
<span style="font-weight: bold;">W</span>indows; <span style="font-weight: bold;">I</span>IS; <span style="font-weight: bold;">M</span>sSQL; <span style="font-weight: bold;">A</span>sp<br />
<span style="font-weight: bold;">W</span>indows; <span style="font-weight: bold;">A</span>pache; <span style="font-weight: bold;">M</span>sSQL; <span style="font-weight: bold;">A</span>sp<br />
<br />
Those are the 5 most common set ups I've seen. Essentially the name comes<br />
from the first letter of every word. So in this regard you get LAMP, WAMP, <br />
WIMP, WAMA, and WIMA. <br />
But what about Xampp? Same thing really. <br />
---<br />
<br />
Now other than this, I'm not sure I want to cover it in this class. Perhaps<br />
next class. Where we'll learn to install servers, configure them, and then<br />
maybe also secure them (but that might be it's own section or go under<br />
management, we'll have to see. <br />
<br />
Thanks for viewing. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Side Lesson 2 - Fun Quiz]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1686</link>
			<pubDate>Thu, 05 Apr 2012 21:49:33 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1686</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1685" target="_blank">VWBC Side Lesson 1</a><br />
----<br />
<br />
Alrighty then, time for a fun little quiz. <br />
<br />
All questions will be in this format: Question: Answer. ;; Of course the answer is provided by you. <br />
----<br />
<br />
Question: What does HTML stand for? <br />
Answer: <br />
<br />
Question: What is HTML?<br />
Answer: <br />
<br />
Question: Is HTML client side or server side language?<br />
Answer: <br />
<br />
Question: What are 10 tags used in HTML?<br />
Answer: (give both start and end tags)<br />
<br />
Question: What does CSS stand for? <br />
Answer: <br />
<br />
Question: What does CSS do? <br />
Answer: <br />
<br />
Question: Is CSS client side or server side?<br />
Answer: <br />
<br />
Question: What are some things you can do with CSS? <br />
Answer: <br />
<br />
Question: What 3 types of CSS is there? <br />
Answer: <br />
<br />
Question: What is JavaScript? <br />
Answer: <br />
<br />
Question: Is JS client side or server side? <br />
Answer: <br />
<br />
Question: How would we start a JS script? <br />
Answer: <br />
<br />
Question: How can one comment, in JS?<br />
Answer: <br />
<br />
Question: What is PHP?<br />
Answer: <br />
<br />
Question: What does PHP stand for?<br />
Answer: <br />
<br />
Question: Is PHP client side or server side?<br />
Answer: <br />
<br />
Question: How you start and end a PHP script? <br />
Answer: <br />
<br />
Question: What is PHP somewhat similar to? <br />
Answer: <br />
<br />
And that's about it for the quiz. Just fun and simple questions. Shouldn't take more than maybe<br />
3 minutes max to complete it. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1685" target="_blank">VWBC Side Lesson 1</a><br />
----<br />
<br />
Alrighty then, time for a fun little quiz. <br />
<br />
All questions will be in this format: Question: Answer. ;; Of course the answer is provided by you. <br />
----<br />
<br />
Question: What does HTML stand for? <br />
Answer: <br />
<br />
Question: What is HTML?<br />
Answer: <br />
<br />
Question: Is HTML client side or server side language?<br />
Answer: <br />
<br />
Question: What are 10 tags used in HTML?<br />
Answer: (give both start and end tags)<br />
<br />
Question: What does CSS stand for? <br />
Answer: <br />
<br />
Question: What does CSS do? <br />
Answer: <br />
<br />
Question: Is CSS client side or server side?<br />
Answer: <br />
<br />
Question: What are some things you can do with CSS? <br />
Answer: <br />
<br />
Question: What 3 types of CSS is there? <br />
Answer: <br />
<br />
Question: What is JavaScript? <br />
Answer: <br />
<br />
Question: Is JS client side or server side? <br />
Answer: <br />
<br />
Question: How would we start a JS script? <br />
Answer: <br />
<br />
Question: How can one comment, in JS?<br />
Answer: <br />
<br />
Question: What is PHP?<br />
Answer: <br />
<br />
Question: What does PHP stand for?<br />
Answer: <br />
<br />
Question: Is PHP client side or server side?<br />
Answer: <br />
<br />
Question: How you start and end a PHP script? <br />
Answer: <br />
<br />
Question: What is PHP somewhat similar to? <br />
Answer: <br />
<br />
And that's about it for the quiz. Just fun and simple questions. Shouldn't take more than maybe<br />
3 minutes max to complete it. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Side Lesson 1 - Review]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1685</link>
			<pubDate>Thu, 05 Apr 2012 21:46:43 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1685</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
----<br />
<br />
Alright, after having done some basic classes such as HTML, CSS, JS, and PHP. It's time to review the basics. <br />
Essentially, we'll just go over some quick things and then I'll ask a series of questions. <br />
<br />
--HTML: <br />
<br />
In HTML we learned that it is a basic language. It stands for Hyper Text Markup Language. That it is essentially the<br />
body/skeleton of a webpage. That some tags are needed and some aren't. We over tables, cells, rows, doctypes, <br />
and much more. But all in all, that is it generally an easy language to grasp. <br />
<br />
--CSS: <br />
<br />
In CSS we learned what type of styles there was, such as inline, external, and internal. We learned what the basic structure of <br />
one was. We learned what divs were and how we can create our own classes and make them extensible in design. All in all, a pretty <br />
easy language to grasp. <br />
<br />
--JS: <br />
<br />
In JS, We learned what functions were, variables, alerts, how to write something to the page, we learned that it's a client side language<br />
or that it could be disabled in the browser. We learned that we can make a web page pretty user friendly and interactive with this lang. <br />
And that all in all, a pretty easy to use language, so long as you get the basic gist of it. <br />
<br />
--PHP: <br />
<br />
In PHP We learned that it's a server side language, that it could enhance security and usability of a website. We revisited functions, variables, <br />
classes, loops, statements and cases. And that all in all it's a easy language if you learned JS first, and _maybe_ a little harder, if you didn't. <br />
<br />
---<br />
<br />
That's pretty much what a review looks like. Since I don't have any questions being directed at me, I can't really answer any. ._. So for <br />
the next class, which is a quiz. I'll probably still post it, but just immediately start the next class. After I reach plan 15-17, I'll update the OP<br />
with more lessons. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1684" target="_blank">VWBC Lesson 12</a><br />
----<br />
<br />
Alright, after having done some basic classes such as HTML, CSS, JS, and PHP. It's time to review the basics. <br />
Essentially, we'll just go over some quick things and then I'll ask a series of questions. <br />
<br />
--HTML: <br />
<br />
In HTML we learned that it is a basic language. It stands for Hyper Text Markup Language. That it is essentially the<br />
body/skeleton of a webpage. That some tags are needed and some aren't. We over tables, cells, rows, doctypes, <br />
and much more. But all in all, that is it generally an easy language to grasp. <br />
<br />
--CSS: <br />
<br />
In CSS we learned what type of styles there was, such as inline, external, and internal. We learned what the basic structure of <br />
one was. We learned what divs were and how we can create our own classes and make them extensible in design. All in all, a pretty <br />
easy language to grasp. <br />
<br />
--JS: <br />
<br />
In JS, We learned what functions were, variables, alerts, how to write something to the page, we learned that it's a client side language<br />
or that it could be disabled in the browser. We learned that we can make a web page pretty user friendly and interactive with this lang. <br />
And that all in all, a pretty easy to use language, so long as you get the basic gist of it. <br />
<br />
--PHP: <br />
<br />
In PHP We learned that it's a server side language, that it could enhance security and usability of a website. We revisited functions, variables, <br />
classes, loops, statements and cases. And that all in all it's a easy language if you learned JS first, and _maybe_ a little harder, if you didn't. <br />
<br />
---<br />
<br />
That's pretty much what a review looks like. Since I don't have any questions being directed at me, I can't really answer any. ._. So for <br />
the next class, which is a quiz. I'll probably still post it, but just immediately start the next class. After I reach plan 15-17, I'll update the OP<br />
with more lessons. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 12: PHP Basics Ending]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1684</link>
			<pubDate>Thu, 05 Apr 2012 21:43:52 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1684</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
----<br />
<br />
Alrighty then, the last of the PHP classes. Today we'll be going over, While loops(), For loops(), functions(), the &#36;_GET and &#36;_POST methods<br />
and if enough time/room date and so on. <br />
<br />
So to jump right in, a while loop. A while loop is a loop which loops through a block of code while a specified condition is true. <br />
A good example of this is :<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;moo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /><br />while(</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">)&nbsp;{&nbsp;<br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;&lt;br&gt;&nbsp;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;moo</span><span style="color: #007700">++;<br />}&nbsp;<br /><br /></span><span style="color: #FF8000">//Essentially&nbsp;this&nbsp;will&nbsp;output&nbsp;1,&nbsp;2,&nbsp;3,&nbsp;4,&nbsp;5&nbsp;to&nbsp;a&nbsp;new&nbsp;line&nbsp;all&nbsp;5&nbsp;times&nbsp;then&nbsp;go&nbsp;to&nbsp;the&nbsp;next&nbsp;piece&nbsp;of&nbsp;code.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now, there is the while loop but there is also the do...while() loop too. Which basically what this loop does is always <br />
execute the block of code once, it will then check the condition, and repeat the loop while the condition is true.<br />
So a good example here is: <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;moo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /><br />do&nbsp;{<br /></span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">++;<br /><br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br /><br />}<br /><br />while(</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//Which&nbsp;will&nbsp;essentially&nbsp;2,&nbsp;3,&nbsp;4,&nbsp;5,&nbsp;6&nbsp;breaking&nbsp;to&nbsp;a&nbsp;new&nbsp;line&nbsp;each&nbsp;time.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now, on to the for loop() and the foreach loop(). <br />
The for loop is used when you know in advance how many times the script should run.<br />
Also some good to know is the for loop should meet 3 things. <br />
"for(init, condition, increment)". And I'll go over all 3. <br />
<br />
(from w3c)<br />
init: Mostly used to set a counter (but can be any code to be executed once at the beginning of the loop)<br />
condition: Evaluated for each loop iteration. If it evaluates to TRUE, the loop continues. If it evaluates to FALSE, the loop ends.<br />
increment: Mostly used to increment a counter (but can be any code to be executed at the end of the loop)<br />
<br />
Note: Each of the parameters above can be empty, or have multiple expressions (separated by commas).<br />
(/end from w3c)<br />
<br />
A good example of this is :<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">for&nbsp;(</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">=&nbsp;&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#36;moo</span><span style="color: #007700">&lt;=</span><span style="color: #0000BB">5</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#36;moo</span><span style="color: #007700">++)&nbsp;{<br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #FF8000">//&nbsp;The&nbsp;above&nbsp;will&nbsp;just&nbsp;out&nbsp;1,&nbsp;2,&nbsp;3,&nbsp;4,&nbsp;5&nbsp;to&nbsp;a&nbsp;new&nbsp;line.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now then, the foreach loop() is basically, used to loop through arrays. a good example of this is: <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;moo&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"Red"</span><span style="color: #007700">,</span><span style="color: #DD0000">"White"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Blue"</span><span style="color: #007700">);<br />foreach&nbsp;(</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;v</span><span style="color: #007700">)&nbsp;{<br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;v&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//Would&nbsp;essentially&nbsp;display&nbsp;"Red,&nbsp;White&nbsp;Blue"&nbsp;in&nbsp;that&nbsp;order&nbsp;to&nbsp;a&nbsp;new&nbsp;line.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
And, wow moving along now, we'll get into functions now. Basically, functions, like every other language is pretty simple<br />
function FunctionName(). A function is nothing more than a container to hold code to be run at any time, it's called. <br />
<br />
Here's a practical example; <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">Moo</span><span style="color: #007700">()&nbsp;{&nbsp;<br />echo&nbsp;</span><span style="color: #DD0000">"wee"</span><span style="color: #007700">;<br />}<br /><br />echo&nbsp;</span><span style="color: #0000BB">Moo</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
That's about the simplest way to explain it. It's basically just like Java Script. <br />
Now, on to the methods of PHP. POST and GET. I'll display them like this: <br />
<br />
GET Method: Is used to get method from a form (or where ever you have it, commonly, a form.) <br />
It's visible to everyone and can be seen in the URL and is limited to the amount of information that<br />
could be sent. <br />
<br />
POST Method: Is invisible to everyone, and doesn't really have limits on what it could send, however there<br />
is a 8MB Max size for the post method, which is default and easily changed via the php.ini file. <br />
<br />
Best examples of these, if used in a form is: <br />
Get method: <a href="http://www.website.com/whatup.php?name=%24user&amp;msg=sup." target="_blank">http://www.website.com/whatup.php?name=&#36;user&msg=sup.</a><br />
Post method: <a href="http://www.website.com/whatup.php?" target="_blank">http://www.website.com/whatup.php?</a><br />
<br />
Both will display the same exact thing on the page. However, notice the difference in the URL bar? <br />
<br />
When we start going over more advanced things later in the classes, I'll be sure to come back to PHP. However, for now, <br />
PHP, sadly, is ending and next time we'll get to move on to the next thing. Be sure to view again please.<br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1683" target="_blank">VWBC Lesson 11</a><br />
----<br />
<br />
Alrighty then, the last of the PHP classes. Today we'll be going over, While loops(), For loops(), functions(), the &#36;_GET and &#36;_POST methods<br />
and if enough time/room date and so on. <br />
<br />
So to jump right in, a while loop. A while loop is a loop which loops through a block of code while a specified condition is true. <br />
A good example of this is :<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;moo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /><br />while(</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">)&nbsp;{&nbsp;<br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;&lt;br&gt;&nbsp;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;moo</span><span style="color: #007700">++;<br />}&nbsp;<br /><br /></span><span style="color: #FF8000">//Essentially&nbsp;this&nbsp;will&nbsp;output&nbsp;1,&nbsp;2,&nbsp;3,&nbsp;4,&nbsp;5&nbsp;to&nbsp;a&nbsp;new&nbsp;line&nbsp;all&nbsp;5&nbsp;times&nbsp;then&nbsp;go&nbsp;to&nbsp;the&nbsp;next&nbsp;piece&nbsp;of&nbsp;code.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now, there is the while loop but there is also the do...while() loop too. Which basically what this loop does is always <br />
execute the block of code once, it will then check the condition, and repeat the loop while the condition is true.<br />
So a good example here is: <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;moo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /><br />do&nbsp;{<br /></span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">++;<br /><br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br /><br />}<br /><br />while(</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//Which&nbsp;will&nbsp;essentially&nbsp;2,&nbsp;3,&nbsp;4,&nbsp;5,&nbsp;6&nbsp;breaking&nbsp;to&nbsp;a&nbsp;new&nbsp;line&nbsp;each&nbsp;time.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now, on to the for loop() and the foreach loop(). <br />
The for loop is used when you know in advance how many times the script should run.<br />
Also some good to know is the for loop should meet 3 things. <br />
"for(init, condition, increment)". And I'll go over all 3. <br />
<br />
(from w3c)<br />
init: Mostly used to set a counter (but can be any code to be executed once at the beginning of the loop)<br />
condition: Evaluated for each loop iteration. If it evaluates to TRUE, the loop continues. If it evaluates to FALSE, the loop ends.<br />
increment: Mostly used to increment a counter (but can be any code to be executed at the end of the loop)<br />
<br />
Note: Each of the parameters above can be empty, or have multiple expressions (separated by commas).<br />
(/end from w3c)<br />
<br />
A good example of this is :<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">for&nbsp;(</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">=&nbsp;&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#36;moo</span><span style="color: #007700">&lt;=</span><span style="color: #0000BB">5</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#36;moo</span><span style="color: #007700">++)&nbsp;{<br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #FF8000">//&nbsp;The&nbsp;above&nbsp;will&nbsp;just&nbsp;out&nbsp;1,&nbsp;2,&nbsp;3,&nbsp;4,&nbsp;5&nbsp;to&nbsp;a&nbsp;new&nbsp;line.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now then, the foreach loop() is basically, used to loop through arrays. a good example of this is: <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;moo&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"Red"</span><span style="color: #007700">,</span><span style="color: #DD0000">"White"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Blue"</span><span style="color: #007700">);<br />foreach&nbsp;(</span><span style="color: #0000BB">&#36;moo&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;v</span><span style="color: #007700">)&nbsp;{<br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;v&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//Would&nbsp;essentially&nbsp;display&nbsp;"Red,&nbsp;White&nbsp;Blue"&nbsp;in&nbsp;that&nbsp;order&nbsp;to&nbsp;a&nbsp;new&nbsp;line.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
And, wow moving along now, we'll get into functions now. Basically, functions, like every other language is pretty simple<br />
function FunctionName(). A function is nothing more than a container to hold code to be run at any time, it's called. <br />
<br />
Here's a practical example; <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">Moo</span><span style="color: #007700">()&nbsp;{&nbsp;<br />echo&nbsp;</span><span style="color: #DD0000">"wee"</span><span style="color: #007700">;<br />}<br /><br />echo&nbsp;</span><span style="color: #0000BB">Moo</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
That's about the simplest way to explain it. It's basically just like Java Script. <br />
Now, on to the methods of PHP. POST and GET. I'll display them like this: <br />
<br />
GET Method: Is used to get method from a form (or where ever you have it, commonly, a form.) <br />
It's visible to everyone and can be seen in the URL and is limited to the amount of information that<br />
could be sent. <br />
<br />
POST Method: Is invisible to everyone, and doesn't really have limits on what it could send, however there<br />
is a 8MB Max size for the post method, which is default and easily changed via the php.ini file. <br />
<br />
Best examples of these, if used in a form is: <br />
Get method: <a href="http://www.website.com/whatup.php?name=%24user&amp;msg=sup." target="_blank">http://www.website.com/whatup.php?name=&#36;user&msg=sup.</a><br />
Post method: <a href="http://www.website.com/whatup.php?" target="_blank">http://www.website.com/whatup.php?</a><br />
<br />
Both will display the same exact thing on the page. However, notice the difference in the URL bar? <br />
<br />
When we start going over more advanced things later in the classes, I'll be sure to come back to PHP. However, for now, <br />
PHP, sadly, is ending and next time we'll get to move on to the next thing. Be sure to view again please.<br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 11: PHP Basics Continued]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1683</link>
			<pubDate>Thu, 05 Apr 2012 21:42:17 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1683</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
----<br />
<br />
Alright today we're going to be going over if statement, if...else statement, if...else...else statement, switch statement and if I have enough time/room, maybe also some arrays. <br />
<br />
So to state, JS and PHP are similar in what we can do with switch statements, if statements, if..elese statements and so on. It's pretty<br />
similar because well, PHP has a lot of the same syntaxing. Just...different. So if You've gone over the JS section you shouldn't have much<br />
problems with the PHP section. So first we're going to go over the if statement. Like always, here's a example. <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #FF8000">//&nbsp;opening&nbsp;tag<br /><br /></span><span style="color: #0000BB">&#36;num1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;var&nbsp;1<br /></span><span style="color: #0000BB">&#36;num2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;var&nbsp;2<br /><br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;num1&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#36;num2</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;basic&nbsp;if&nbsp;statement.&nbsp;If&nbsp;var1&nbsp;isnt&nbsp;equal&nbsp;to&nbsp;var&nbsp;2,&nbsp;then&nbsp;echo&nbsp;this.<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Well..Gee.&nbsp;I'd&nbsp;think&nbsp;so&nbsp;too.&nbsp;Lol"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now, since the if statement is pretty simple, let's move on to the if ...else statement. <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #FF8000">//&nbsp;opening&nbsp;tag<br /><br /></span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#36;var2</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;statement&nbsp;start.&nbsp;this&nbsp;is&nbsp;a&nbsp;condition.<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"&nbsp;I&nbsp;would&nbsp;hope&nbsp;so.&nbsp;"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;echo&nbsp;if&nbsp;condition&nbsp;is&nbsp;met<br /></span><span style="color: #007700">}&nbsp;else&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;the&nbsp;condition&nbsp;is&nbsp;NOT&nbsp;met,&nbsp;then&nbsp;switch&nbsp;to&nbsp;this&nbsp;"else"&nbsp;statement.&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Wtf?&nbsp;Since&nbsp;when?"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;echo&nbsp;is&nbsp;the&nbsp;first&nbsp;condition&nbsp;not&nbsp;met.&nbsp;<br /></span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
See? Pretty easy right? Same as JS right? Well now we'll go over something NOT in the JS section, that being the if...elseif...else statement. <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;var1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var3&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">&#36;var2</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;start&nbsp;if&nbsp;condition&nbsp;1,&nbsp;like&nbsp;always.&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"No&nbsp;it's&nbsp;not."</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;statement&nbsp;is&nbsp;true.&nbsp;<br /></span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#36;var3</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;the&nbsp;first&nbsp;is&nbsp;not&nbsp;true&nbsp;switch&nbsp;to&nbsp;here&nbsp;with&nbsp;new&nbsp;condition/if&nbsp;statement<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"well&nbsp;of&nbsp;course&nbsp;not"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;statement&nbsp;is&nbsp;true.&nbsp;<br /></span><span style="color: #007700">}&nbsp;else&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;neither&nbsp;is&nbsp;true.&nbsp;then&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"K...something&nbsp;be&nbsp;messed&nbsp;up&nbsp;here.&nbsp;._."</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;echo&nbsp;this&nbsp;thing&nbsp;<br /></span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
See? It seems kind of confusing at first but once you use it a couple times, you get the hang of it. <br />
<br />
And it looks we have enough time and room for arrays. So, let's move to arrays. What an array is, is well a good way<br />
to explain it is like this. A variable can hold only data value. An array is a number of variables with a data value. So think of an<br />
array as not only a container, but a special type of variable that can hold more variables. Make sense? Well..there are 3 types of<br />
arrays. Numeric array which is an array with a numeric index, Associative array which is an array where each ID key is associated <br />
with a value, Multidimensional array which is an array containing one or more arrays<br />
 An example of a Numeric one: (there are 2 ways to write one, so I'll show both).<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;days&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"Sun"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Mon"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Tues"</span><span style="color: #007700">,</span><span style="color: #DD0000">"etc..."</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;is&nbsp;the&nbsp;first&nbsp;way&nbsp;to&nbsp;write&nbsp;a&nbsp;numeric&nbsp;array.&nbsp;<br />//&nbsp;The&nbsp;one&nbsp;above&nbsp;will&nbsp;auto&nbsp;assign&nbsp;what's&nbsp;called&nbsp;an&nbsp;"id&nbsp;key"&nbsp;to&nbsp;the&nbsp;values.&nbsp;<br />//&nbsp;Now&nbsp;to&nbsp;assign&nbsp;our&nbsp;own&nbsp;key,&nbsp;we'll&nbsp;make&nbsp;another&nbsp;array,&nbsp;the&nbsp;second&nbsp;way.&nbsp;<br /></span><span style="color: #0000BB">&#36;days2&nbsp;</span><span style="color: #007700">=&nbsp;array();&nbsp;</span><span style="color: #FF8000">//&nbsp;Start&nbsp;the&nbsp;array.<br />//&nbsp;To&nbsp;start&nbsp;the&nbsp;array&nbsp;and&nbsp;assign&nbsp;out&nbsp;own&nbsp;id&nbsp;keys,&nbsp;we&nbsp;first&nbsp;should&nbsp;know&nbsp;that&nbsp;to&nbsp;make&nbsp;an&nbsp;array&nbsp;like&nbsp;this&nbsp;one<br />//&nbsp;you&nbsp;have&nbsp;to&nbsp;have&nbsp;the&nbsp;same&nbsp;variable&nbsp;with&nbsp;a&nbsp;[#].&nbsp;I'll&nbsp;show&nbsp;you:<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"Sun"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;See&nbsp;how&nbsp;I&nbsp;have&nbsp;the&nbsp;same&nbsp;variable?&nbsp;And&nbsp;the&nbsp;[0]?&nbsp;The&nbsp;[0]&nbsp;is&nbsp;essentially&nbsp;this&nbsp;is&nbsp;the&nbsp;first<br />//&nbsp;value&nbsp;for&nbsp;our&nbsp;array&nbsp;and&nbsp;an&nbsp;array&nbsp;must&nbsp;always&nbsp;start&nbsp;with&nbsp;the&nbsp;number&nbsp;[0]&nbsp;and&nbsp;not&nbsp;[1].<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"Mon"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;is&nbsp;our&nbsp;second&nbsp;value.&nbsp;the&nbsp;[0],&nbsp;[1],&nbsp;[2]&nbsp;must&nbsp;be&nbsp;in&nbsp;chronological&nbsp;order.&nbsp;Not&nbsp;[1][2][0][4][9][5]...<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"Tues"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;our&nbsp;last&nbsp;value,&nbsp;still&nbsp;note&nbsp;how&nbsp;each&nbsp;time&nbsp;I&nbsp;have&nbsp;the&nbsp;variable&nbsp;the&nbsp;same&nbsp;name&nbsp;just&nbsp;with&nbsp;a&nbsp;[]&nbsp;in&nbsp;it.&nbsp;<br /><br />//And&nbsp;to&nbsp;call&nbsp;the&nbsp;array&nbsp;in&nbsp;to&nbsp;action,&nbsp;is&nbsp;done&nbsp;like&nbsp;so.&nbsp;<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Is&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"the&nbsp;same&nbsp;as&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"?"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;Remember&nbsp;what&nbsp;I&nbsp;said&nbsp;about&nbsp;ID&nbsp;keys.&nbsp;(that's&nbsp;the&nbsp;[0][1][2]&nbsp;part.<br />//&nbsp;And&nbsp;remember&nbsp;what&nbsp;I&nbsp;said&nbsp;about&nbsp;the&nbsp;."".&nbsp;or&nbsp;""&nbsp;..&nbsp;"";<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
That was with the 2 versions of a numeric array, so lets move on to the next one. Associative array. <br />
Now, sometimes it's not always best to use the first type of array so we came up with this type of array. Now like before, <br />
there is 2 ways to do this. I'll show both again. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;days&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"Sun"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Mon"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Tues"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&nbsp;That&nbsp;was&nbsp;the&nbsp;first&nbsp;way&nbsp;to&nbsp;write&nbsp;it.&nbsp;First&nbsp;you&nbsp;have&nbsp;the&nbsp;""&nbsp;to&nbsp;put&nbsp;a&nbsp;data&nbsp;value&nbsp;inside&nbsp;of.&nbsp;Then&nbsp;you&nbsp;have&nbsp;the&nbsp;=&gt;&nbsp;an&nbsp;identifier&nbsp;as&nbsp;<br />//&nbsp;to&nbsp;what&nbsp;the&nbsp;next&nbsp;value&nbsp;is,&nbsp;that&nbsp;is&nbsp;related&nbsp;to&nbsp;the&nbsp;first&nbsp;value.&nbsp;(if&nbsp;that&nbsp;didn't&nbsp;make&nbsp;sense,&nbsp;sorry&nbsp;._.)<br />//&nbsp;And&nbsp;now&nbsp;the&nbsp;second&nbsp;way&nbsp;to&nbsp;type&nbsp;it.&nbsp;<br /></span><span style="color: #0000BB">&#36;days2&nbsp;</span><span style="color: #007700">=&nbsp;array();&nbsp;</span><span style="color: #FF8000">//&nbsp;Like&nbsp;before&nbsp;initiate&nbsp;array<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #DD0000">"Sun"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;time&nbsp;we&nbsp;assign&nbsp;the&nbsp;ID&nbsp;key&nbsp;a&nbsp;name&nbsp;and&nbsp;give&nbsp;it&nbsp;a&nbsp;value.&nbsp;<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #DD0000">"Mon"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;remember&nbsp;the&nbsp;variable&nbsp;needs&nbsp;to&nbsp;remain&nbsp;the&nbsp;same.&nbsp;<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #DD0000">"Tues"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"3"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;and&nbsp;then...<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Is&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #DD0000">"Mon"</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"the&nbsp;same&nbsp;number&nbsp;ID&nbsp;as&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">[</span><span style="color: #DD0000">"Sun"</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"?"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
If any of you are actually taking these scripts and using an IDE to generate a response, then you should see what<br />
the outcomes are. And least not last (or something like that) is the last type of Array, multidimensional. And like the<br />
others, you can also do this one 2 ways as well. I'll display both. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">//&nbsp;So&nbsp;below&nbsp;is&nbsp;a&nbsp;multi&nbsp;array&nbsp;of&nbsp;the&nbsp;days.&nbsp;See&nbsp;how&nbsp;the&nbsp;array&nbsp;is&nbsp;within&nbsp;the&nbsp;array?It&nbsp;may&nbsp;look&nbsp;confusing&nbsp;at&nbsp;first,&nbsp;but&nbsp;like&nbsp;the&nbsp;others&nbsp;it&nbsp;just&nbsp;takes&nbsp;practice<br /></span><span style="color: #0000BB">&#36;days&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"Sunday"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">"This"</span><span style="color: #007700">,</span><span style="color: #DD0000">"is"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Sunday"</span><span style="color: #007700">),&nbsp;</span><span style="color: #DD0000">"Monday"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">"This"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Is"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Monday"</span><span style="color: #007700">),&nbsp;</span><span style="color: #DD0000">"Tuesday"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">"This"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Is"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Tuesday"</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">//&nbsp;And&nbsp;now&nbsp;this&nbsp;is&nbsp;the&nbsp;second&nbsp;way&nbsp;(which&nbsp;may&nbsp;look&nbsp;neater)(not&nbsp;sure).&nbsp;<br /><br /></span><span style="color: #0000BB">&#36;days2&nbsp;</span><span style="color: #007700">=&nbsp;Array(<br />[</span><span style="color: #0000BB">Sunday</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;Array(<br />[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">This<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Is<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Sunday</span><span style="color: #007700">),<br /><br />[</span><span style="color: #0000BB">Monday</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;Array(<br />[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">This<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Is<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Monday</span><span style="color: #007700">),<br /><br />[</span><span style="color: #0000BB">Tuesday</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;array(<br />[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">This<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Is<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Tuesday</span><span style="color: #007700">));<br /><br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">Sunday</span><span style="color: #007700">][</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"?"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;Depending&nbsp;on&nbsp;your&nbsp;IDE&nbsp;it&nbsp;may&nbsp;or&nbsp;may&nbsp;not&nbsp;error&nbsp;for&nbsp;you.&nbsp;._.&nbsp;Mine&nbsp;does,&nbsp;but&nbsp;it's&nbsp;correct.&nbsp;<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
And that concludes that arrays part. Now to save time and room on this post, I have to cut the class here. But next class<br />
will be the end of the PHP lessons, and then you'll be getting a short easy homework assignment. ._. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1682" target="_blank">VWBC Lesson 10</a><br />
----<br />
<br />
Alright today we're going to be going over if statement, if...else statement, if...else...else statement, switch statement and if I have enough time/room, maybe also some arrays. <br />
<br />
So to state, JS and PHP are similar in what we can do with switch statements, if statements, if..elese statements and so on. It's pretty<br />
similar because well, PHP has a lot of the same syntaxing. Just...different. So if You've gone over the JS section you shouldn't have much<br />
problems with the PHP section. So first we're going to go over the if statement. Like always, here's a example. <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #FF8000">//&nbsp;opening&nbsp;tag<br /><br /></span><span style="color: #0000BB">&#36;num1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;var&nbsp;1<br /></span><span style="color: #0000BB">&#36;num2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;var&nbsp;2<br /><br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;num1&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#36;num2</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;basic&nbsp;if&nbsp;statement.&nbsp;If&nbsp;var1&nbsp;isnt&nbsp;equal&nbsp;to&nbsp;var&nbsp;2,&nbsp;then&nbsp;echo&nbsp;this.<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Well..Gee.&nbsp;I'd&nbsp;think&nbsp;so&nbsp;too.&nbsp;Lol"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now, since the if statement is pretty simple, let's move on to the if ...else statement. <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #FF8000">//&nbsp;opening&nbsp;tag<br /><br /></span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#36;var2</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;statement&nbsp;start.&nbsp;this&nbsp;is&nbsp;a&nbsp;condition.<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"&nbsp;I&nbsp;would&nbsp;hope&nbsp;so.&nbsp;"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;echo&nbsp;if&nbsp;condition&nbsp;is&nbsp;met<br /></span><span style="color: #007700">}&nbsp;else&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;the&nbsp;condition&nbsp;is&nbsp;NOT&nbsp;met,&nbsp;then&nbsp;switch&nbsp;to&nbsp;this&nbsp;"else"&nbsp;statement.&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Wtf?&nbsp;Since&nbsp;when?"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;echo&nbsp;is&nbsp;the&nbsp;first&nbsp;condition&nbsp;not&nbsp;met.&nbsp;<br /></span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
See? Pretty easy right? Same as JS right? Well now we'll go over something NOT in the JS section, that being the if...elseif...else statement. <br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;var1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var3&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">&#36;var2</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;start&nbsp;if&nbsp;condition&nbsp;1,&nbsp;like&nbsp;always.&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"No&nbsp;it's&nbsp;not."</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;statement&nbsp;is&nbsp;true.&nbsp;<br /></span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#36;var3</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;the&nbsp;first&nbsp;is&nbsp;not&nbsp;true&nbsp;switch&nbsp;to&nbsp;here&nbsp;with&nbsp;new&nbsp;condition/if&nbsp;statement<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"well&nbsp;of&nbsp;course&nbsp;not"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;statement&nbsp;is&nbsp;true.&nbsp;<br /></span><span style="color: #007700">}&nbsp;else&nbsp;{&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;neither&nbsp;is&nbsp;true.&nbsp;then&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"K...something&nbsp;be&nbsp;messed&nbsp;up&nbsp;here.&nbsp;._."</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;echo&nbsp;this&nbsp;thing&nbsp;<br /></span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
See? It seems kind of confusing at first but once you use it a couple times, you get the hang of it. <br />
<br />
And it looks we have enough time and room for arrays. So, let's move to arrays. What an array is, is well a good way<br />
to explain it is like this. A variable can hold only data value. An array is a number of variables with a data value. So think of an<br />
array as not only a container, but a special type of variable that can hold more variables. Make sense? Well..there are 3 types of<br />
arrays. Numeric array which is an array with a numeric index, Associative array which is an array where each ID key is associated <br />
with a value, Multidimensional array which is an array containing one or more arrays<br />
 An example of a Numeric one: (there are 2 ways to write one, so I'll show both).<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;days&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"Sun"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Mon"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Tues"</span><span style="color: #007700">,</span><span style="color: #DD0000">"etc..."</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;is&nbsp;the&nbsp;first&nbsp;way&nbsp;to&nbsp;write&nbsp;a&nbsp;numeric&nbsp;array.&nbsp;<br />//&nbsp;The&nbsp;one&nbsp;above&nbsp;will&nbsp;auto&nbsp;assign&nbsp;what's&nbsp;called&nbsp;an&nbsp;"id&nbsp;key"&nbsp;to&nbsp;the&nbsp;values.&nbsp;<br />//&nbsp;Now&nbsp;to&nbsp;assign&nbsp;our&nbsp;own&nbsp;key,&nbsp;we'll&nbsp;make&nbsp;another&nbsp;array,&nbsp;the&nbsp;second&nbsp;way.&nbsp;<br /></span><span style="color: #0000BB">&#36;days2&nbsp;</span><span style="color: #007700">=&nbsp;array();&nbsp;</span><span style="color: #FF8000">//&nbsp;Start&nbsp;the&nbsp;array.<br />//&nbsp;To&nbsp;start&nbsp;the&nbsp;array&nbsp;and&nbsp;assign&nbsp;out&nbsp;own&nbsp;id&nbsp;keys,&nbsp;we&nbsp;first&nbsp;should&nbsp;know&nbsp;that&nbsp;to&nbsp;make&nbsp;an&nbsp;array&nbsp;like&nbsp;this&nbsp;one<br />//&nbsp;you&nbsp;have&nbsp;to&nbsp;have&nbsp;the&nbsp;same&nbsp;variable&nbsp;with&nbsp;a&nbsp;[#].&nbsp;I'll&nbsp;show&nbsp;you:<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"Sun"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;See&nbsp;how&nbsp;I&nbsp;have&nbsp;the&nbsp;same&nbsp;variable?&nbsp;And&nbsp;the&nbsp;[0]?&nbsp;The&nbsp;[0]&nbsp;is&nbsp;essentially&nbsp;this&nbsp;is&nbsp;the&nbsp;first<br />//&nbsp;value&nbsp;for&nbsp;our&nbsp;array&nbsp;and&nbsp;an&nbsp;array&nbsp;must&nbsp;always&nbsp;start&nbsp;with&nbsp;the&nbsp;number&nbsp;[0]&nbsp;and&nbsp;not&nbsp;[1].<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"Mon"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;is&nbsp;our&nbsp;second&nbsp;value.&nbsp;the&nbsp;[0],&nbsp;[1],&nbsp;[2]&nbsp;must&nbsp;be&nbsp;in&nbsp;chronological&nbsp;order.&nbsp;Not&nbsp;[1][2][0][4][9][5]...<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"Tues"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;our&nbsp;last&nbsp;value,&nbsp;still&nbsp;note&nbsp;how&nbsp;each&nbsp;time&nbsp;I&nbsp;have&nbsp;the&nbsp;variable&nbsp;the&nbsp;same&nbsp;name&nbsp;just&nbsp;with&nbsp;a&nbsp;[]&nbsp;in&nbsp;it.&nbsp;<br /><br />//And&nbsp;to&nbsp;call&nbsp;the&nbsp;array&nbsp;in&nbsp;to&nbsp;action,&nbsp;is&nbsp;done&nbsp;like&nbsp;so.&nbsp;<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Is&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"the&nbsp;same&nbsp;as&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"?"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;Remember&nbsp;what&nbsp;I&nbsp;said&nbsp;about&nbsp;ID&nbsp;keys.&nbsp;(that's&nbsp;the&nbsp;[0][1][2]&nbsp;part.<br />//&nbsp;And&nbsp;remember&nbsp;what&nbsp;I&nbsp;said&nbsp;about&nbsp;the&nbsp;."".&nbsp;or&nbsp;""&nbsp;..&nbsp;"";<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
That was with the 2 versions of a numeric array, so lets move on to the next one. Associative array. <br />
Now, sometimes it's not always best to use the first type of array so we came up with this type of array. Now like before, <br />
there is 2 ways to do this. I'll show both again. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;days&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"Sun"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Mon"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Tues"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&nbsp;That&nbsp;was&nbsp;the&nbsp;first&nbsp;way&nbsp;to&nbsp;write&nbsp;it.&nbsp;First&nbsp;you&nbsp;have&nbsp;the&nbsp;""&nbsp;to&nbsp;put&nbsp;a&nbsp;data&nbsp;value&nbsp;inside&nbsp;of.&nbsp;Then&nbsp;you&nbsp;have&nbsp;the&nbsp;=&gt;&nbsp;an&nbsp;identifier&nbsp;as&nbsp;<br />//&nbsp;to&nbsp;what&nbsp;the&nbsp;next&nbsp;value&nbsp;is,&nbsp;that&nbsp;is&nbsp;related&nbsp;to&nbsp;the&nbsp;first&nbsp;value.&nbsp;(if&nbsp;that&nbsp;didn't&nbsp;make&nbsp;sense,&nbsp;sorry&nbsp;._.)<br />//&nbsp;And&nbsp;now&nbsp;the&nbsp;second&nbsp;way&nbsp;to&nbsp;type&nbsp;it.&nbsp;<br /></span><span style="color: #0000BB">&#36;days2&nbsp;</span><span style="color: #007700">=&nbsp;array();&nbsp;</span><span style="color: #FF8000">//&nbsp;Like&nbsp;before&nbsp;initiate&nbsp;array<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #DD0000">"Sun"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;time&nbsp;we&nbsp;assign&nbsp;the&nbsp;ID&nbsp;key&nbsp;a&nbsp;name&nbsp;and&nbsp;give&nbsp;it&nbsp;a&nbsp;value.&nbsp;<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #DD0000">"Mon"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;remember&nbsp;the&nbsp;variable&nbsp;needs&nbsp;to&nbsp;remain&nbsp;the&nbsp;same.&nbsp;<br /></span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #DD0000">"Tues"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"3"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;and&nbsp;then...<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Is&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #DD0000">"Mon"</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"the&nbsp;same&nbsp;number&nbsp;ID&nbsp;as&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">[</span><span style="color: #DD0000">"Sun"</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"?"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
If any of you are actually taking these scripts and using an IDE to generate a response, then you should see what<br />
the outcomes are. And least not last (or something like that) is the last type of Array, multidimensional. And like the<br />
others, you can also do this one 2 ways as well. I'll display both. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">//&nbsp;So&nbsp;below&nbsp;is&nbsp;a&nbsp;multi&nbsp;array&nbsp;of&nbsp;the&nbsp;days.&nbsp;See&nbsp;how&nbsp;the&nbsp;array&nbsp;is&nbsp;within&nbsp;the&nbsp;array?It&nbsp;may&nbsp;look&nbsp;confusing&nbsp;at&nbsp;first,&nbsp;but&nbsp;like&nbsp;the&nbsp;others&nbsp;it&nbsp;just&nbsp;takes&nbsp;practice<br /></span><span style="color: #0000BB">&#36;days&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"Sunday"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">"This"</span><span style="color: #007700">,</span><span style="color: #DD0000">"is"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Sunday"</span><span style="color: #007700">),&nbsp;</span><span style="color: #DD0000">"Monday"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">"This"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Is"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Monday"</span><span style="color: #007700">),&nbsp;</span><span style="color: #DD0000">"Tuesday"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">"This"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Is"</span><span style="color: #007700">,</span><span style="color: #DD0000">"Tuesday"</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">//&nbsp;And&nbsp;now&nbsp;this&nbsp;is&nbsp;the&nbsp;second&nbsp;way&nbsp;(which&nbsp;may&nbsp;look&nbsp;neater)(not&nbsp;sure).&nbsp;<br /><br /></span><span style="color: #0000BB">&#36;days2&nbsp;</span><span style="color: #007700">=&nbsp;Array(<br />[</span><span style="color: #0000BB">Sunday</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;Array(<br />[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">This<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Is<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Sunday</span><span style="color: #007700">),<br /><br />[</span><span style="color: #0000BB">Monday</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;Array(<br />[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">This<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Is<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Monday</span><span style="color: #007700">),<br /><br />[</span><span style="color: #0000BB">Tuesday</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;array(<br />[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">This<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Is<br /></span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">Tuesday</span><span style="color: #007700">));<br /><br />echo&nbsp;</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days2</span><span style="color: #007700">[</span><span style="color: #0000BB">Sunday</span><span style="color: #007700">][</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"?"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;Depending&nbsp;on&nbsp;your&nbsp;IDE&nbsp;it&nbsp;may&nbsp;or&nbsp;may&nbsp;not&nbsp;error&nbsp;for&nbsp;you.&nbsp;._.&nbsp;Mine&nbsp;does,&nbsp;but&nbsp;it's&nbsp;correct.&nbsp;<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
And that concludes that arrays part. Now to save time and room on this post, I have to cut the class here. But next class<br />
will be the end of the PHP lessons, and then you'll be getting a short easy homework assignment. ._. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 10: PHP Basics]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1682</link>
			<pubDate>Thu, 05 Apr 2012 21:40:20 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1682</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
----<br />
<br />
Alright so today we're going to be getting into PHP. PHP Stands for <br />
"PHP: Hypertext Preprocessor" or as some call it "Pre Hypertext Processor".<br />
<br />
PHP just happens to be a "Server Side" language. So far we've only gone<br />
over "Client Side". Basically you put almost anything in a PHP script such as<br />
HTML, CSS, Javascript and so on. You can also use 3 different extensions<br />
such as ".php" ".php3" and ".phtml". Now with PHP you need a server to <br />
parse it. Mainly any OS should do. You can use Linux, Unix, Windows...<br />
Anything really. Also most times you need a database to connect it too, <br />
however we'll leave that for later. Because there are quite a bit of scripts<br />
we could make which do not require a Database. <br />
<br />
Now while I would tell you to go ahead and install a server on your computer<br />
so we can install PHP. I won't. We'll leave that for later when we get to<br />
more advanced stuff. For now just use a free webhost. <br />
<br />
Alright like all things I'll begin with telling you how to invoke the script<br />
meaning, how to start it. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;is&nbsp;the&nbsp;start&nbsp;tag.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span>&nbsp;//&nbsp;this&nbsp;is&nbsp;the&nbsp;end&nbsp;tag.&nbsp;<br />//&nbsp;Technically&nbsp;you&nbsp;can&nbsp;use&nbsp;this&nbsp;too:<br /><span style="color: #0000BB">&lt;?&nbsp;</span><span style="color: #FF8000">//&nbsp;start&nbsp;tag<br /></span><span style="color: #0000BB">?&gt;</span>&nbsp;//&nbsp;end&nbsp;tag.&nbsp;<br /></code></div></div></div>
<br />
Like all things again, we need a way to comment our code. Which we can <br />
do with these methods: <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">#&nbsp;This&nbsp;is&nbsp;a&nbsp;comment.&nbsp;<br />#&nbsp;this&nbsp;is&nbsp;a&nbsp;comment.&nbsp;<br />#&nbsp;this&nbsp;is&nbsp;a&nbsp;comment.&nbsp;<br /><br />//&nbsp;This&nbsp;is&nbsp;a&nbsp;single&nbsp;line&nbsp;comment.<br />//&nbsp;This&nbsp;is&nbsp;a&nbsp;single&nbsp;line&nbsp;comment.&nbsp;<br />//&nbsp;This&nbsp;is&nbsp;a&nbsp;single&nbsp;line&nbsp;comment.&nbsp;<br /><br />/**<br />*&nbsp;This&nbsp;is&nbsp;a&nbsp;block&nbsp;comment.<br />**/<br /><br />/**<br />*&nbsp;This&nbsp;is&nbsp;a&nbsp;Block&nbsp;comment<br />*&nbsp;with&nbsp;an&nbsp;extra&nbsp;line<br />**/<br /><br />/**<br />*&nbsp;This&nbsp;is&nbsp;a&nbsp;block&nbsp;comment<br />*&nbsp;with&nbsp;an&nbsp;extra&nbsp;line<br />*&nbsp;and&nbsp;another&nbsp;extra&nbsp;line<br />*&nbsp;and&nbsp;so&nbsp;on&nbsp;<br />**/&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Moving along..Basically the most used way to "display" data to a page is<br />
using the "Echo" command. Like <span style="color: #9370DB;">echo()</span>. A good example is this: <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Moo&nbsp;moo&nbsp;moo&nbsp;moo"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;Technically&nbsp;the&nbsp;()&nbsp;isn't&nbsp;used.&nbsp;It's&nbsp;just&nbsp;there&nbsp;for&nbsp;show&nbsp;I&nbsp;guess.&nbsp;Lol.<br />//&nbsp;However&nbsp;you&nbsp;can&nbsp;add&nbsp;it&nbsp;if&nbsp;you&nbsp;want.&nbsp;This&nbsp;has&nbsp;never&nbsp;affected&nbsp;me.&nbsp;<br /></span><span style="color: #007700">&lt;?&nbsp;<br /></span></code></div></div></div>
<br />
Wow. Moving fast. Maybe because I'm super excited about teaching PHP. <br />
The next thing we'll get into is variables. <br />
<br />
A variable is more or less something you can define to hold a data value. <br />
Now the thing with PHP is, it's a loosely typed language meaning, that<br />
technically you don't need to declare the variable before using it. Now on<br />
to some naming specifications. When naming a variable ALWAYS start it off<br />
with the "<span style="color: #87CEEB;">&#36;</span>". This is because this is how a variable<br />
is declared. After that you give it a name. Which can ONLY have the following: Uppercase, Lowercase, numbers and an underscore ("_").<br />
HOWEVER it may ONLY start with an underscore, or letter. Nothing else. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;this_is_a_variable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;Now&nbsp;to&nbsp;declare&nbsp;a&nbsp;variable&nbsp;you&nbsp;first&nbsp;name&nbsp;it.&nbsp;And&nbsp;then&nbsp;assign&nbsp;a&nbsp;data<br />//&nbsp;value&nbsp;to&nbsp;it.&nbsp;Like&nbsp;so:&nbsp;<br /><br /></span><span style="color: #0000BB">&#36;variable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"string&nbsp;of&nbsp;text"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;variable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;a&nbsp;number<br /></span><span style="color: #0000BB">&#36;variable&nbsp;</span><span style="color: #007700">=&nbsp;function();<br /></span><span style="color: #0000BB">&#36;variable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;variable2</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;This&nbsp;is&nbsp;more&nbsp;or&nbsp;less&nbsp;the&nbsp;only&nbsp;ways&nbsp;to&nbsp;define&nbsp;a&nbsp;variable.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Moving along on how to use those variable. Just like JS. You can use it to<br />
do math for you. Or display data. How to use 2 variable in a string?<br />
like so: <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;var1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"this&nbsp;is"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"a&nbsp;string"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var3&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"more&nbsp;string."</span><span style="color: #007700">;<br /><br />echo&nbsp;</span><span style="color: #0000BB">&#36;var1</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;this&nbsp;is&nbsp;using&nbsp;a&nbsp;single&nbsp;variable.&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;var2</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;this&nbsp;is&nbsp;using&nbsp;2&nbsp;variables.&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;var3</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;this&nbsp;is&nbsp;3.&nbsp;<br /><br />//&nbsp;Essentially&nbsp;to&nbsp;add&nbsp;more&nbsp;variables&nbsp;to&nbsp;it&nbsp;just&nbsp;keep&nbsp;using&nbsp;.&nbsp;"&nbsp;"&nbsp;.<br />//&nbsp;Although&nbsp;technically&nbsp;it&nbsp;doesn't&nbsp;need&nbsp;all&nbsp;the&nbsp;spaces.&nbsp;I&nbsp;just&nbsp;do&nbsp;that<br />//&nbsp;because&nbsp;it&nbsp;looks&nbsp;neat&nbsp;and&nbsp;clean.&nbsp;And&nbsp;that's&nbsp;how&nbsp;I&nbsp;prefer&nbsp;my&nbsp;code<br />//&nbsp;to&nbsp;look.&nbsp;You&nbsp;could&nbsp;technically&nbsp;use:&nbsp;."".&nbsp;which&nbsp;in&nbsp;it's&nbsp;own&nbsp;light,&nbsp;looks<br />//&nbsp;clean&nbsp;as&nbsp;well.&nbsp;<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now then there is a couple of other basic functions like strlen and strpos<br />
but I find them to be useless and I've never used them. So sadly I will not<br />
go over them (unless someone wants me too. <br />
<br />
There are things called Operators. However they're more or less the same<br />
exact ones as JS. So I'll just post a link to the ones found on W3C. <br />
<a href="http://www.w3schools.com/php/php_operators.asp" target="_blank">http://www.w3schools.com/php/php_operators.asp</a><br />
<br />
If you'd like though I can go over them. <br />
----<br />
<br />
Sadly now guys, I must end the class here. For I fear I might not stop<br />
if I don't. However fear not there will be another soon! So for now I'll leave<br />
you with the basics and wonderment of what we do with these operators. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1681" target="_blank">VWBC Lesson 9</a><br />
----<br />
<br />
Alright so today we're going to be getting into PHP. PHP Stands for <br />
"PHP: Hypertext Preprocessor" or as some call it "Pre Hypertext Processor".<br />
<br />
PHP just happens to be a "Server Side" language. So far we've only gone<br />
over "Client Side". Basically you put almost anything in a PHP script such as<br />
HTML, CSS, Javascript and so on. You can also use 3 different extensions<br />
such as ".php" ".php3" and ".phtml". Now with PHP you need a server to <br />
parse it. Mainly any OS should do. You can use Linux, Unix, Windows...<br />
Anything really. Also most times you need a database to connect it too, <br />
however we'll leave that for later. Because there are quite a bit of scripts<br />
we could make which do not require a Database. <br />
<br />
Now while I would tell you to go ahead and install a server on your computer<br />
so we can install PHP. I won't. We'll leave that for later when we get to<br />
more advanced stuff. For now just use a free webhost. <br />
<br />
Alright like all things I'll begin with telling you how to invoke the script<br />
meaning, how to start it. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;is&nbsp;the&nbsp;start&nbsp;tag.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span>&nbsp;//&nbsp;this&nbsp;is&nbsp;the&nbsp;end&nbsp;tag.&nbsp;<br />//&nbsp;Technically&nbsp;you&nbsp;can&nbsp;use&nbsp;this&nbsp;too:<br /><span style="color: #0000BB">&lt;?&nbsp;</span><span style="color: #FF8000">//&nbsp;start&nbsp;tag<br /></span><span style="color: #0000BB">?&gt;</span>&nbsp;//&nbsp;end&nbsp;tag.&nbsp;<br /></code></div></div></div>
<br />
Like all things again, we need a way to comment our code. Which we can <br />
do with these methods: <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">#&nbsp;This&nbsp;is&nbsp;a&nbsp;comment.&nbsp;<br />#&nbsp;this&nbsp;is&nbsp;a&nbsp;comment.&nbsp;<br />#&nbsp;this&nbsp;is&nbsp;a&nbsp;comment.&nbsp;<br /><br />//&nbsp;This&nbsp;is&nbsp;a&nbsp;single&nbsp;line&nbsp;comment.<br />//&nbsp;This&nbsp;is&nbsp;a&nbsp;single&nbsp;line&nbsp;comment.&nbsp;<br />//&nbsp;This&nbsp;is&nbsp;a&nbsp;single&nbsp;line&nbsp;comment.&nbsp;<br /><br />/**<br />*&nbsp;This&nbsp;is&nbsp;a&nbsp;block&nbsp;comment.<br />**/<br /><br />/**<br />*&nbsp;This&nbsp;is&nbsp;a&nbsp;Block&nbsp;comment<br />*&nbsp;with&nbsp;an&nbsp;extra&nbsp;line<br />**/<br /><br />/**<br />*&nbsp;This&nbsp;is&nbsp;a&nbsp;block&nbsp;comment<br />*&nbsp;with&nbsp;an&nbsp;extra&nbsp;line<br />*&nbsp;and&nbsp;another&nbsp;extra&nbsp;line<br />*&nbsp;and&nbsp;so&nbsp;on&nbsp;<br />**/&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Moving along..Basically the most used way to "display" data to a page is<br />
using the "Echo" command. Like <span style="color: #9370DB;">echo()</span>. A good example is this: <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Moo&nbsp;moo&nbsp;moo&nbsp;moo"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;Technically&nbsp;the&nbsp;()&nbsp;isn't&nbsp;used.&nbsp;It's&nbsp;just&nbsp;there&nbsp;for&nbsp;show&nbsp;I&nbsp;guess.&nbsp;Lol.<br />//&nbsp;However&nbsp;you&nbsp;can&nbsp;add&nbsp;it&nbsp;if&nbsp;you&nbsp;want.&nbsp;This&nbsp;has&nbsp;never&nbsp;affected&nbsp;me.&nbsp;<br /></span><span style="color: #007700">&lt;?&nbsp;<br /></span></code></div></div></div>
<br />
Wow. Moving fast. Maybe because I'm super excited about teaching PHP. <br />
The next thing we'll get into is variables. <br />
<br />
A variable is more or less something you can define to hold a data value. <br />
Now the thing with PHP is, it's a loosely typed language meaning, that<br />
technically you don't need to declare the variable before using it. Now on<br />
to some naming specifications. When naming a variable ALWAYS start it off<br />
with the "<span style="color: #87CEEB;">&#36;</span>". This is because this is how a variable<br />
is declared. After that you give it a name. Which can ONLY have the following: Uppercase, Lowercase, numbers and an underscore ("_").<br />
HOWEVER it may ONLY start with an underscore, or letter. Nothing else. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;this_is_a_variable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;Now&nbsp;to&nbsp;declare&nbsp;a&nbsp;variable&nbsp;you&nbsp;first&nbsp;name&nbsp;it.&nbsp;And&nbsp;then&nbsp;assign&nbsp;a&nbsp;data<br />//&nbsp;value&nbsp;to&nbsp;it.&nbsp;Like&nbsp;so:&nbsp;<br /><br /></span><span style="color: #0000BB">&#36;variable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"string&nbsp;of&nbsp;text"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;variable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;a&nbsp;number<br /></span><span style="color: #0000BB">&#36;variable&nbsp;</span><span style="color: #007700">=&nbsp;function();<br /></span><span style="color: #0000BB">&#36;variable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;variable2</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;This&nbsp;is&nbsp;more&nbsp;or&nbsp;less&nbsp;the&nbsp;only&nbsp;ways&nbsp;to&nbsp;define&nbsp;a&nbsp;variable.&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Moving along on how to use those variable. Just like JS. You can use it to<br />
do math for you. Or display data. How to use 2 variable in a string?<br />
like so: <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&#36;var1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"this&nbsp;is"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"a&nbsp;string"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;var3&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"more&nbsp;string."</span><span style="color: #007700">;<br /><br />echo&nbsp;</span><span style="color: #0000BB">&#36;var1</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;this&nbsp;is&nbsp;using&nbsp;a&nbsp;single&nbsp;variable.&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;var2</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;this&nbsp;is&nbsp;using&nbsp;2&nbsp;variables.&nbsp;<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;var1&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;var2&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;var3</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;this&nbsp;is&nbsp;3.&nbsp;<br /><br />//&nbsp;Essentially&nbsp;to&nbsp;add&nbsp;more&nbsp;variables&nbsp;to&nbsp;it&nbsp;just&nbsp;keep&nbsp;using&nbsp;.&nbsp;"&nbsp;"&nbsp;.<br />//&nbsp;Although&nbsp;technically&nbsp;it&nbsp;doesn't&nbsp;need&nbsp;all&nbsp;the&nbsp;spaces.&nbsp;I&nbsp;just&nbsp;do&nbsp;that<br />//&nbsp;because&nbsp;it&nbsp;looks&nbsp;neat&nbsp;and&nbsp;clean.&nbsp;And&nbsp;that's&nbsp;how&nbsp;I&nbsp;prefer&nbsp;my&nbsp;code<br />//&nbsp;to&nbsp;look.&nbsp;You&nbsp;could&nbsp;technically&nbsp;use:&nbsp;."".&nbsp;which&nbsp;in&nbsp;it's&nbsp;own&nbsp;light,&nbsp;looks<br />//&nbsp;clean&nbsp;as&nbsp;well.&nbsp;<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
Now then there is a couple of other basic functions like strlen and strpos<br />
but I find them to be useless and I've never used them. So sadly I will not<br />
go over them (unless someone wants me too. <br />
<br />
There are things called Operators. However they're more or less the same<br />
exact ones as JS. So I'll just post a link to the ones found on W3C. <br />
<a href="http://www.w3schools.com/php/php_operators.asp" target="_blank">http://www.w3schools.com/php/php_operators.asp</a><br />
<br />
If you'd like though I can go over them. <br />
----<br />
<br />
Sadly now guys, I must end the class here. For I fear I might not stop<br />
if I don't. However fear not there will be another soon! So for now I'll leave<br />
you with the basics and wonderment of what we do with these operators. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 9: JavaScript Basics Ending]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1681</link>
			<pubDate>Thu, 05 Apr 2012 21:36:15 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1681</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
----<br />
<br />
It looks like we're going to be finishing up Java Script today and starting PHP afterwards.<br />
<br />
To repeat, let's review what we've gone over, Alert(), Prompt(), Confirm(),<br />
Variables, if statement, If...else statement, functions, switch statement, <br />
Operators, and comparison operators. <br />
<br />
Today we'll be going over, for loops, while loops, break loops and possibly<br />
special characters. While there is a lot more, I don't see it used very often<br />
one such example being "document.write". Having to write that a million<br />
times over would be a hassle to any JS scripter. <br />
--<br />
<br />
Jumping right in; A for loop basically it loops through a block of code a <br />
specified number of times. <br />
<br />
An example of this is: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
var i=0; // Our variable is I and it's equal to 0. <br />
for (i=0;i&lt;=5;i++) // Here we say for I is equal to 0, I is less than 5, so increment I till 5.<br />
{<br />
document.write("number:" + i ); //We didn't go over it but a document.write just "writes" something to a page, much like echo or print.<br />
}<br />
&lt;/script&gt;</code></div></div>
<br />
I used the most common variable I've ever seen. "I". <br />
"var i=0" -&gt; Basically our variable is "I". It's equal to 0. <br />
"for(i=0" -&gt; Basically our var I, is equal to 0, at the start of the for loop.<br />
";i&lt;5" -&gt; This states that our variable "i" is less than 5. <br />
"i++" -&gt; This states that our variable "I", will increment because it's less <br />
than 5. <br />
<br />
We then used document.write to display that data. We didn't go over it, <br />
but document.write is basically just another way to output something to a <br />
page just like echo and print. <br />
<br />
That's all there really is a to a for loop. It just repeats a code a number of<br />
times to cut down on the number of equal statements we would have to <br />
use. <br />
<br />
Next up is a while loop. The while loops, basically loops through a block of<br />
code while a specified condition is true. A good example of this is, <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
var i=0;<br />
while (i&lt;=5)<br />
&nbsp;&nbsp;{<br />
documen.write("number: " + i);<br />
&nbsp;&nbsp;i++;<br />
&nbsp;&nbsp;}<br />
&lt;/script&gt;</code></div></div>
<br />
Again I took the most common variable and used it. <br />
"var i=0;" -&gt; Our variable "I" is equal to 0. <br />
"while (i&lt;=5)" -&gt; While our variable is less than or equal to 5 we execute<br />
this code::<br />
"document.write("number: " + i);" -&gt; Out put the number to the page. <br />
"i++" increment the variable "I" to a new number one higher after this code<br />
is executed. <br />
<br />
And now finally the last of the loops is the break loop. The break loop<br />
basically states; The statement will break the loop and continue executing<br />
the code that follows after the loop, if there is any. <br />
An example of this would be: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
var i=0;<br />
for (i=0;i&lt;=5;i++)<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;if (i==3)<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;document.write("number: " + i );<br />
&nbsp;&nbsp;}<br />
&lt;/script&gt;</code></div></div>
<br />
Mostly everything is the same, but: <br />
"var i=0" -&gt; Our variable is equal to 0. <br />
"for (i=0;i&lt;=5;i++) {" Again, just a simple for statement, and we would<br />
execute code normally in this statement, however, instead of going<br />
through the whole thing, we instead do a break, IF something is met. <br />
"{<br />
if( i == 3 ) {<br />
break;<br />
}" And like that in the middle of the code, if i was equal to 3 we break <br />
the statement and continue to the next bit of code and completely ignore<br />
the rest of the loop. So the next bit to be displayed is: <br />
"}<br />
document.write("number: " + i );" display the number current. <br />
<br />
Another thing about the break statement is that you can use the <br />
"continue" statement which does the same exact thing really. So I suggest<br />
using break; instead. <br />
<br />
And since this less was a bit shorter than I thought it would be, Let's go<br />
over also, special characters; <br />
<br />
In Java Script, a string is stopped by either a single or double quote. So<br />
to stop this we add special characters like / and \. <br />
<br />
Like so, <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script&gt;<br />
var moo = "moo is moo but we'll a "so called" moomoo too";<br />
document.write("this won't display because of the quotes but here: " + moo );<br />
&lt;/script&gt;</code></div></div>
<br />
That would display an error because JS would think the line ended after <br />
the second double quote. So to get around this we add \" and \" to the<br />
2 quotes where we were quoting something else. And thankfully it won't<br />
display moo \" so called \" , instead it'll display moo "so called", .<br />
<br />
Here's a list of them for JS. <br />
(as seen on W3C)<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;' =&gt; single quote</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;" =&gt; double quote</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;&#92; =&gt; backslash</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;n =&gt; new line</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;r =&gt; carriage return</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;t =&gt; tab</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;b =&gt; backspace</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;f =&gt; form feed</code></div></div>
<br />
And that about does it for JS ending. Next time you see this class it'll be<br />
on to real fun stuff. PHP. A completely different language to these last 3. <br />
And completely more extensible as it allows for some serious things to get<br />
done. And it's quite capable of performing quite a bit of things. I can't wait<br />
to throw you into the world of PHP. Literally one the most used and one<br />
of the best languages to learn while young. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1680" target="_blank">VWBC Lesson 8</a><br />
----<br />
<br />
It looks like we're going to be finishing up Java Script today and starting PHP afterwards.<br />
<br />
To repeat, let's review what we've gone over, Alert(), Prompt(), Confirm(),<br />
Variables, if statement, If...else statement, functions, switch statement, <br />
Operators, and comparison operators. <br />
<br />
Today we'll be going over, for loops, while loops, break loops and possibly<br />
special characters. While there is a lot more, I don't see it used very often<br />
one such example being "document.write". Having to write that a million<br />
times over would be a hassle to any JS scripter. <br />
--<br />
<br />
Jumping right in; A for loop basically it loops through a block of code a <br />
specified number of times. <br />
<br />
An example of this is: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
var i=0; // Our variable is I and it's equal to 0. <br />
for (i=0;i&lt;=5;i++) // Here we say for I is equal to 0, I is less than 5, so increment I till 5.<br />
{<br />
document.write("number:" + i ); //We didn't go over it but a document.write just "writes" something to a page, much like echo or print.<br />
}<br />
&lt;/script&gt;</code></div></div>
<br />
I used the most common variable I've ever seen. "I". <br />
"var i=0" -&gt; Basically our variable is "I". It's equal to 0. <br />
"for(i=0" -&gt; Basically our var I, is equal to 0, at the start of the for loop.<br />
";i&lt;5" -&gt; This states that our variable "i" is less than 5. <br />
"i++" -&gt; This states that our variable "I", will increment because it's less <br />
than 5. <br />
<br />
We then used document.write to display that data. We didn't go over it, <br />
but document.write is basically just another way to output something to a <br />
page just like echo and print. <br />
<br />
That's all there really is a to a for loop. It just repeats a code a number of<br />
times to cut down on the number of equal statements we would have to <br />
use. <br />
<br />
Next up is a while loop. The while loops, basically loops through a block of<br />
code while a specified condition is true. A good example of this is, <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
var i=0;<br />
while (i&lt;=5)<br />
&nbsp;&nbsp;{<br />
documen.write("number: " + i);<br />
&nbsp;&nbsp;i++;<br />
&nbsp;&nbsp;}<br />
&lt;/script&gt;</code></div></div>
<br />
Again I took the most common variable and used it. <br />
"var i=0;" -&gt; Our variable "I" is equal to 0. <br />
"while (i&lt;=5)" -&gt; While our variable is less than or equal to 5 we execute<br />
this code::<br />
"document.write("number: " + i);" -&gt; Out put the number to the page. <br />
"i++" increment the variable "I" to a new number one higher after this code<br />
is executed. <br />
<br />
And now finally the last of the loops is the break loop. The break loop<br />
basically states; The statement will break the loop and continue executing<br />
the code that follows after the loop, if there is any. <br />
An example of this would be: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
var i=0;<br />
for (i=0;i&lt;=5;i++)<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;if (i==3)<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;document.write("number: " + i );<br />
&nbsp;&nbsp;}<br />
&lt;/script&gt;</code></div></div>
<br />
Mostly everything is the same, but: <br />
"var i=0" -&gt; Our variable is equal to 0. <br />
"for (i=0;i&lt;=5;i++) {" Again, just a simple for statement, and we would<br />
execute code normally in this statement, however, instead of going<br />
through the whole thing, we instead do a break, IF something is met. <br />
"{<br />
if( i == 3 ) {<br />
break;<br />
}" And like that in the middle of the code, if i was equal to 3 we break <br />
the statement and continue to the next bit of code and completely ignore<br />
the rest of the loop. So the next bit to be displayed is: <br />
"}<br />
document.write("number: " + i );" display the number current. <br />
<br />
Another thing about the break statement is that you can use the <br />
"continue" statement which does the same exact thing really. So I suggest<br />
using break; instead. <br />
<br />
And since this less was a bit shorter than I thought it would be, Let's go<br />
over also, special characters; <br />
<br />
In Java Script, a string is stopped by either a single or double quote. So<br />
to stop this we add special characters like / and \. <br />
<br />
Like so, <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script&gt;<br />
var moo = "moo is moo but we'll a "so called" moomoo too";<br />
document.write("this won't display because of the quotes but here: " + moo );<br />
&lt;/script&gt;</code></div></div>
<br />
That would display an error because JS would think the line ended after <br />
the second double quote. So to get around this we add \" and \" to the<br />
2 quotes where we were quoting something else. And thankfully it won't<br />
display moo \" so called \" , instead it'll display moo "so called", .<br />
<br />
Here's a list of them for JS. <br />
(as seen on W3C)<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;' =&gt; single quote</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;" =&gt; double quote</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;&#92; =&gt; backslash</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;n =&gt; new line</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;r =&gt; carriage return</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;t =&gt; tab</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;b =&gt; backspace</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&#92;f =&gt; form feed</code></div></div>
<br />
And that about does it for JS ending. Next time you see this class it'll be<br />
on to real fun stuff. PHP. A completely different language to these last 3. <br />
And completely more extensible as it allows for some serious things to get<br />
done. And it's quite capable of performing quite a bit of things. I can't wait<br />
to throw you into the world of PHP. Literally one the most used and one<br />
of the best languages to learn while young. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 8: JavaScript Basics Continued]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1680</link>
			<pubDate>Thu, 05 Apr 2012 21:32:59 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1680</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
----<br />
<br />
Hey there guys, welcome back to the class. I am pleased to <br />
inform you, you're half done with JS and then we start PHP. Afterwards, <br />
we'll get into servers, SQL, management, SEO and so on. We'll be going<br />
from coding to managing. Also I have to inform you there is a HUGE test<br />
coming up soon. <br />
---<br />
<br />
To start off this class let's go ahead and just jump right in. Last time we <br />
over alert(), prompt(), confirm(), variables, if statement, if...else statement<br />
commenting, script type, and that we could use expression. Let's continue<br />
from the expressions part and get into operators today. <br />
<br />
Operators are basically math expressions. And while I could list out all <br />
the operators, I thought it might be easier just to show you a picture (plus<br />
that and it'll save on room and allow for more characters). So here's a list<br />
of expressions (credits go to w3 schools for the pic)<br />
<br />
<img src="http://thehallowlife.com/webinar/examples/jsop.png" border="0" alt="[Image: jsop.png]" /><br />
<br />
Going on, if you don't understand how the operators are used, here's a <br />
practical example. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script&gt;<br />
var x = 5<br />
var y = 5<br />
var z = 1<br />
<br />
if (x == y) {<br />
alert(" Obvious right? ");<br />
} <br />
<br />
alert(x + y - z); <br />
//The above should output 5 + 5 - 1 = 9</code></div></div>
<br />
If this still doesn't make sense, let me know please and I can further <br />
elaborate. Going right along to continue the operators there are things <br />
called comparison operators. Kinda like the same thing, but instead of <br />
math function you use them in expressions to compare to. Like this: <br />
if 5 == 5, I said if 5 is equal to 5. Again, I'm going to a screen shot of the<br />
comparison operators to save time and space. <br />
<br />
<img src="http://thehallowlife.com/webinar/examples/jscop.png" border="0" alt="[Image: jscop.png]" /><br />
<br />
If none of that makes sense, please let me know so I can further explain it<br />
and stop using pictures. Again credits to w3c for the pic. Moving along now<br />
<br />
We'll be getting into the switch statement, functions and maybe one more<br />
thing. Mainly because if I want to split these lessons into 3 parts equally<br />
I have to cut myself off, before I decide to throw the rest into one big <br />
thing. So we're almost done guys. <br />
<br />
The switch is a statement just like if, and if...else. How it works is, first<br />
we make a variable, give it a defintion. Then we make a "case" this case<br />
contains a block of code to be executed if the variable so calls for it. And<br />
then we add a "break" at the end of each block so the code doesn't over<br />
run. I guess the easiest way to explain this is to give you an example. <br />
Let's say we have 7 cases. Each case stands for a day of the week. Every<br />
case always starts at 0. So sunday = 0 monday =1 etc. Now we make the<br />
variable call for the date. And then based on the date, a select case is <br />
called and executed. Here's an example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
<br />
var meh = new Date();<br />
var blah = meh.getDay();<br />
switch (blah) {<br />
<br />
case 0:<br />
&nbsp;&nbsp;alert("I have to go to church today.");<br />
&nbsp;&nbsp;break;<br />
case 1:<br />
&nbsp;&nbsp;alert("Blah a mundane Monday. I hate you work.");<br />
&nbsp;&nbsp;break;<br />
case 2:<br />
&nbsp;&nbsp;alert("Terrible Tuesday. Why do you torment me?");<br />
&nbsp;&nbsp;break;<br />
default:<br />
&nbsp;&nbsp;alert("I don't want to have to go to work. ");<br />
<br />
}<br />
&lt;/script&gt;</code></div></div>
<br />
I made a few cases and then using the switch statement, based on<br />
the day it called an alert. But if it couldn't determine or case not found<br />
the default was instead called. <br />
<br />
Next up is functions. And oh man can I have some fun with these. Not only<br />
can it be used to make HTML super fun but it can be used for evil guys, <br />
pure evil. But how it works is like this. You define a function as function<br />
and then the function name(). Like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script&gt; <br />
function moo() { <br />
//this is where you put code for your function<br />
}<br />
&lt;/script&gt;</code></div></div>
<br />
Basically function is like a container to hold a bunch of code and to cut<br />
down on the code you write. The best example would be if you were making<br />
a game. Instead of writing out the SAME conditions each and every time, <br />
just put them into the function, and then call the function. Here's an<br />
example. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script&gt;<br />
<br />
function moo() {<br />
alert("This is a test");<br />
} <br />
<br />
&lt;input type="button" value="Click" onclick="moo()" /&gt;<br />
&lt;/script&gt;</code></div></div>
<br />
Above we used a button to display an alert from a button. But there are far<br />
more ways to use this then what I have here. And honestly, I was thinking<br />
about writing out an entire mini game in pure javascript just to show you <br />
guys how this would be used, functions, switches, if's, if...elses, alert()<br />
prompt and so on.<br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1679" target="_blank">VWBC Lesson 7</a><br />
----<br />
<br />
Hey there guys, welcome back to the class. I am pleased to <br />
inform you, you're half done with JS and then we start PHP. Afterwards, <br />
we'll get into servers, SQL, management, SEO and so on. We'll be going<br />
from coding to managing. Also I have to inform you there is a HUGE test<br />
coming up soon. <br />
---<br />
<br />
To start off this class let's go ahead and just jump right in. Last time we <br />
over alert(), prompt(), confirm(), variables, if statement, if...else statement<br />
commenting, script type, and that we could use expression. Let's continue<br />
from the expressions part and get into operators today. <br />
<br />
Operators are basically math expressions. And while I could list out all <br />
the operators, I thought it might be easier just to show you a picture (plus<br />
that and it'll save on room and allow for more characters). So here's a list<br />
of expressions (credits go to w3 schools for the pic)<br />
<br />
<img src="http://thehallowlife.com/webinar/examples/jsop.png" border="0" alt="[Image: jsop.png]" /><br />
<br />
Going on, if you don't understand how the operators are used, here's a <br />
practical example. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script&gt;<br />
var x = 5<br />
var y = 5<br />
var z = 1<br />
<br />
if (x == y) {<br />
alert(" Obvious right? ");<br />
} <br />
<br />
alert(x + y - z); <br />
//The above should output 5 + 5 - 1 = 9</code></div></div>
<br />
If this still doesn't make sense, let me know please and I can further <br />
elaborate. Going right along to continue the operators there are things <br />
called comparison operators. Kinda like the same thing, but instead of <br />
math function you use them in expressions to compare to. Like this: <br />
if 5 == 5, I said if 5 is equal to 5. Again, I'm going to a screen shot of the<br />
comparison operators to save time and space. <br />
<br />
<img src="http://thehallowlife.com/webinar/examples/jscop.png" border="0" alt="[Image: jscop.png]" /><br />
<br />
If none of that makes sense, please let me know so I can further explain it<br />
and stop using pictures. Again credits to w3c for the pic. Moving along now<br />
<br />
We'll be getting into the switch statement, functions and maybe one more<br />
thing. Mainly because if I want to split these lessons into 3 parts equally<br />
I have to cut myself off, before I decide to throw the rest into one big <br />
thing. So we're almost done guys. <br />
<br />
The switch is a statement just like if, and if...else. How it works is, first<br />
we make a variable, give it a defintion. Then we make a "case" this case<br />
contains a block of code to be executed if the variable so calls for it. And<br />
then we add a "break" at the end of each block so the code doesn't over<br />
run. I guess the easiest way to explain this is to give you an example. <br />
Let's say we have 7 cases. Each case stands for a day of the week. Every<br />
case always starts at 0. So sunday = 0 monday =1 etc. Now we make the<br />
variable call for the date. And then based on the date, a select case is <br />
called and executed. Here's an example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
<br />
var meh = new Date();<br />
var blah = meh.getDay();<br />
switch (blah) {<br />
<br />
case 0:<br />
&nbsp;&nbsp;alert("I have to go to church today.");<br />
&nbsp;&nbsp;break;<br />
case 1:<br />
&nbsp;&nbsp;alert("Blah a mundane Monday. I hate you work.");<br />
&nbsp;&nbsp;break;<br />
case 2:<br />
&nbsp;&nbsp;alert("Terrible Tuesday. Why do you torment me?");<br />
&nbsp;&nbsp;break;<br />
default:<br />
&nbsp;&nbsp;alert("I don't want to have to go to work. ");<br />
<br />
}<br />
&lt;/script&gt;</code></div></div>
<br />
I made a few cases and then using the switch statement, based on<br />
the day it called an alert. But if it couldn't determine or case not found<br />
the default was instead called. <br />
<br />
Next up is functions. And oh man can I have some fun with these. Not only<br />
can it be used to make HTML super fun but it can be used for evil guys, <br />
pure evil. But how it works is like this. You define a function as function<br />
and then the function name(). Like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script&gt; <br />
function moo() { <br />
//this is where you put code for your function<br />
}<br />
&lt;/script&gt;</code></div></div>
<br />
Basically function is like a container to hold a bunch of code and to cut<br />
down on the code you write. The best example would be if you were making<br />
a game. Instead of writing out the SAME conditions each and every time, <br />
just put them into the function, and then call the function. Here's an<br />
example. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script&gt;<br />
<br />
function moo() {<br />
alert("This is a test");<br />
} <br />
<br />
&lt;input type="button" value="Click" onclick="moo()" /&gt;<br />
&lt;/script&gt;</code></div></div>
<br />
Above we used a button to display an alert from a button. But there are far<br />
more ways to use this then what I have here. And honestly, I was thinking<br />
about writing out an entire mini game in pure javascript just to show you <br />
guys how this would be used, functions, switches, if's, if...elses, alert()<br />
prompt and so on.<br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 7: Javascript Basics]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1679</link>
			<pubDate>Thu, 05 Apr 2012 21:30:45 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1679</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
----<br />
<br />
Alright guys. Now that we got the boring stuff out the way, that being<br />
the HTML and CSS which is used for primarily designing and template<br />
websites, we can now move on to the fun and interactive stuff. One thing<br />
I should get out right now and seems to be a common misconception is <br />
JAVA is not the same as Java-Script. (I have to use the dash because this<br />
forum reverts the word into jscript). <br />
<br />
Another thing, Java-script is a client side language and is a scripting lang.<br />
Not a programming language. There is a difference. Since we'll be getting <br />
into dynamic languages now, I'll go ahead and explain the 2 types of sides.<br />
There is Server side, and Client side. Java-script is client side, while PHP<br />
is server side. Client side means that the info is parsed directly from the<br />
browser basically, while server side means the server parses the info/code<br />
and spits it back out to another source (wherever that is, it's dependent.)<br />
<br />
And one more thing, it's VERY important so remember it well. Java-Script <br />
_IS_ case-sensitive. So be sure to watch it. <br />
---<br />
<br />
Now, like all languages, we'll start out with the basics. That being, <br />
statements, comments, simple junk. Again, just easing you into the <br />
course right now. <br />
<br />
Comments. There is 2 ways to write a comment in JS. That is single line  and multi line.<br />
<br />
A single is like this "//" it ALWAYS starts with a double forward slash. <br />
A multi line is "/* */" anything in between those /* */ will be excluded as<br />
a comment. Here's a practical example: <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>// COMMENTT<br />
// More commenting <br />
// Man this is long, let's switch. <br />
<br />
/*<br />
This is a comment in the form <br />
of multi lining. I can write as much as I<br />
want and as long as it stays in the <br />
parameters it's all cool. So let's end the <br />
comment. Like this: <br />
*/</code></div></div>
<br />
It does NOT matter where you put the commenting. However<br />
if you put it in the middle of a code line, make sure it's a multi line<br />
one, because if it looks like this: get.ElementSome(r// comment //andomCodeHere)<br />
<br />
It wont work and the code will screw up and throw out errors. So, to<br />
recap, don't use comment(ors) in the middle of a code. It's almost like...<br />
common sense.<br />
<br />
Next thing is, to make JS work you need to incase it in tags. What type?<br />
Script tags. Like this: &lt;script&gt; &lt;/script&gt; there is ALWAYS a start tag and<br />
a end tag in JS. There is NO exception. But SOMETIMES, if we want a "bit"<br />
more complicated code we have to write a long start script tag, like so<br />
&lt;script type="text/Javascript"&gt; <br />
But there is multiple to write that. HOWEVER, in this class I'm only going<br />
to teach one and it should be the default for you. Don't write "&lt;script&gt;"<br />
as a start, always write out the full thing. It's a good habit to get into. <br />
<br />
Now we can move on to statements. Now, the thing about JS is, it is<br />
more or less just sending commands to the browser to parse (e.g. client<br />
side). However when written, they will execute in the order they are<br />
written. So try not to write them in some random order, give it a purpose.<br />
<br />
Back to statements though, the first one we'll look at is "document.write()"<br />
basically, this means whatever we put in between () will be written to the<br />
document. Thus it's name. HOWEVER, while most anything will be written <br />
DO NOT use this method AT ALL for anything, unless it's either practice or<br />
you found a way to implement it into some JS game that doesn't suck. It is<br />
out right tedious, and make JS look long, sloppy and horrible. So don't use<br />
it. However for teaching purposes, I'll show you it anyway. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt; // remember, always use this unless it's <br />
// like an alert() or something. <br />
<br />
document.write("hello friggin world"); //let's break this down<br />
<br />
/*<br />
document.write tells the browser we're about to write something to the<br />
page. () is what we incase it in. Now notice the "" , that's because we're<br />
using text. Such as speech. If we were using numbers, or a variable or <br />
something else, we wouldn't need the quotes. You can use either of the<br />
2 quotes, however for speech types, it's good practice to use double<br />
quotes. Also notice the ";" at the end of the line. In JS it's not technically<br />
needed, however in this class it is needed and damn good practice to get<br />
into. <br />
*/<br />
&lt;/script&gt; // end tag.</code></div></div>
<br />
If you were to copy that, put into a html page and run it. The only thing<br />
it would display is the hellow firggin world. And nothing else. Everything<br />
else is commented. <br />
<br />
The other statements we'll be going over is alert(), prompt() and confirm()<br />
Starting with alert(). <br />
<br />
Basically with alert() anything in between the () will be displayed as a pop-<br />
up. Annoying as they are, they can be used for some good. You can use it<br />
to display text, numbers, expressions, variable and etc. However for this<br />
instance we're only going to be seeing text and numbers. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
alert("this is text, when run this will display this text as a pop up");<br />
alert(5);<br />
//If you run this, the above will display a line of text and then a number<br />
//just a single number. And also,<br />
alert(5 + 5);<br />
//the above will do the math for you. So you can also use JS to do<br />
//math for you<br />
&lt;/script&gt;</code></div></div>
<br />
While there is a plethora of ways to do math with JS, you have to use<br />
something called "operators", which we'll get into later. Moving along, <br />
<br />
Basically to use confirm() is the same thing. It displays as a pop up with<br />
some text asking the person to confirm with a yes/no. And prompt() is <br />
also the same way, it displays a pop up and "prompts" the user for some<br />
info. With some clever going, you can make some cool stuff with it. <br />
let's see them: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
alert("moo");<br />
<br />
prompt("How was your day?", "");<br />
<br />
confirm("Do you like this class?");</code></div></div>
<br />
In the prompt case, You saw I left blank quotes. You DON'T have to do<br />
that. You can put something in there, and that will display as a sort of<br />
"default" answer. There are ways to expand this and make it billions times<br />
better. However, we can't get into that until we get into syntax's and<br />
what not. Going on, <br />
<br />
In JS we have what's called variables. They can be anything you want<br />
HOWEVER, they may ONLY start with a letter or an underscore ( _ ). It<br />
is also case sensitive so a and A are not the same thing. To use a variable<br />
we define it as "var ". Meaning it starts with "var" and then the variable name. <br />
<br />
An example: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
<br />
var x = "some text"; <br />
// i called the variable x. <br />
// I made it a text based variable<br />
//and then ended it with a semi colon. And now to use it practically<br />
<br />
alert(x);<br />
<br />
&lt;/script&gt;</code></div></div>
<br />
The way they can be used is almost pretty much infinite in my opinion. <br />
There's a lot more ways to show you this that would look cooler and make<br />
more sense, but...it's not like we're learning anything too complex yet, so<br />
for now I'll leave it at this. And now to move on to the part that really<br />
gives JS some power. Statements. if, if..else and so on. But today we're<br />
only going to cover those 2, if and if...else. <br />
<br />
The if statement basically states "if blah is equal to blah" then execute<br />
blahhh. Or you could do "if blah is blah, execute blahh". It's probably easier<br />
to just show you. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
<br />
var x = 5<br />
<br />
if ( x == 1 ) {<br />
alert("No freaking way");<br />
} <br />
// --<br />
//this is how to use if else<br />
if ( x == 2 ) {<br />
alert("bs") <br />
} else {<br />
alert("Yeah, thought so. 5 does not equal 2");<br />
}<br />
&lt;/script&gt;</code></div></div>
<br />
There we saw the if statement, and how the else statement is used. <br />
-----<br />
<br />
Let me guys know if you don't get anything. or have any suggestions. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1678" target="_blank">VWBC Lesson 6</a><br />
----<br />
<br />
Alright guys. Now that we got the boring stuff out the way, that being<br />
the HTML and CSS which is used for primarily designing and template<br />
websites, we can now move on to the fun and interactive stuff. One thing<br />
I should get out right now and seems to be a common misconception is <br />
JAVA is not the same as Java-Script. (I have to use the dash because this<br />
forum reverts the word into jscript). <br />
<br />
Another thing, Java-script is a client side language and is a scripting lang.<br />
Not a programming language. There is a difference. Since we'll be getting <br />
into dynamic languages now, I'll go ahead and explain the 2 types of sides.<br />
There is Server side, and Client side. Java-script is client side, while PHP<br />
is server side. Client side means that the info is parsed directly from the<br />
browser basically, while server side means the server parses the info/code<br />
and spits it back out to another source (wherever that is, it's dependent.)<br />
<br />
And one more thing, it's VERY important so remember it well. Java-Script <br />
_IS_ case-sensitive. So be sure to watch it. <br />
---<br />
<br />
Now, like all languages, we'll start out with the basics. That being, <br />
statements, comments, simple junk. Again, just easing you into the <br />
course right now. <br />
<br />
Comments. There is 2 ways to write a comment in JS. That is single line  and multi line.<br />
<br />
A single is like this "//" it ALWAYS starts with a double forward slash. <br />
A multi line is "/* */" anything in between those /* */ will be excluded as<br />
a comment. Here's a practical example: <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>// COMMENTT<br />
// More commenting <br />
// Man this is long, let's switch. <br />
<br />
/*<br />
This is a comment in the form <br />
of multi lining. I can write as much as I<br />
want and as long as it stays in the <br />
parameters it's all cool. So let's end the <br />
comment. Like this: <br />
*/</code></div></div>
<br />
It does NOT matter where you put the commenting. However<br />
if you put it in the middle of a code line, make sure it's a multi line<br />
one, because if it looks like this: get.ElementSome(r// comment //andomCodeHere)<br />
<br />
It wont work and the code will screw up and throw out errors. So, to<br />
recap, don't use comment(ors) in the middle of a code. It's almost like...<br />
common sense.<br />
<br />
Next thing is, to make JS work you need to incase it in tags. What type?<br />
Script tags. Like this: &lt;script&gt; &lt;/script&gt; there is ALWAYS a start tag and<br />
a end tag in JS. There is NO exception. But SOMETIMES, if we want a "bit"<br />
more complicated code we have to write a long start script tag, like so<br />
&lt;script type="text/Javascript"&gt; <br />
But there is multiple to write that. HOWEVER, in this class I'm only going<br />
to teach one and it should be the default for you. Don't write "&lt;script&gt;"<br />
as a start, always write out the full thing. It's a good habit to get into. <br />
<br />
Now we can move on to statements. Now, the thing about JS is, it is<br />
more or less just sending commands to the browser to parse (e.g. client<br />
side). However when written, they will execute in the order they are<br />
written. So try not to write them in some random order, give it a purpose.<br />
<br />
Back to statements though, the first one we'll look at is "document.write()"<br />
basically, this means whatever we put in between () will be written to the<br />
document. Thus it's name. HOWEVER, while most anything will be written <br />
DO NOT use this method AT ALL for anything, unless it's either practice or<br />
you found a way to implement it into some JS game that doesn't suck. It is<br />
out right tedious, and make JS look long, sloppy and horrible. So don't use<br />
it. However for teaching purposes, I'll show you it anyway. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt; // remember, always use this unless it's <br />
// like an alert() or something. <br />
<br />
document.write("hello friggin world"); //let's break this down<br />
<br />
/*<br />
document.write tells the browser we're about to write something to the<br />
page. () is what we incase it in. Now notice the "" , that's because we're<br />
using text. Such as speech. If we were using numbers, or a variable or <br />
something else, we wouldn't need the quotes. You can use either of the<br />
2 quotes, however for speech types, it's good practice to use double<br />
quotes. Also notice the ";" at the end of the line. In JS it's not technically<br />
needed, however in this class it is needed and damn good practice to get<br />
into. <br />
*/<br />
&lt;/script&gt; // end tag.</code></div></div>
<br />
If you were to copy that, put into a html page and run it. The only thing<br />
it would display is the hellow firggin world. And nothing else. Everything<br />
else is commented. <br />
<br />
The other statements we'll be going over is alert(), prompt() and confirm()<br />
Starting with alert(). <br />
<br />
Basically with alert() anything in between the () will be displayed as a pop-<br />
up. Annoying as they are, they can be used for some good. You can use it<br />
to display text, numbers, expressions, variable and etc. However for this<br />
instance we're only going to be seeing text and numbers. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
alert("this is text, when run this will display this text as a pop up");<br />
alert(5);<br />
//If you run this, the above will display a line of text and then a number<br />
//just a single number. And also,<br />
alert(5 + 5);<br />
//the above will do the math for you. So you can also use JS to do<br />
//math for you<br />
&lt;/script&gt;</code></div></div>
<br />
While there is a plethora of ways to do math with JS, you have to use<br />
something called "operators", which we'll get into later. Moving along, <br />
<br />
Basically to use confirm() is the same thing. It displays as a pop up with<br />
some text asking the person to confirm with a yes/no. And prompt() is <br />
also the same way, it displays a pop up and "prompts" the user for some<br />
info. With some clever going, you can make some cool stuff with it. <br />
let's see them: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
alert("moo");<br />
<br />
prompt("How was your day?", "");<br />
<br />
confirm("Do you like this class?");</code></div></div>
<br />
In the prompt case, You saw I left blank quotes. You DON'T have to do<br />
that. You can put something in there, and that will display as a sort of<br />
"default" answer. There are ways to expand this and make it billions times<br />
better. However, we can't get into that until we get into syntax's and<br />
what not. Going on, <br />
<br />
In JS we have what's called variables. They can be anything you want<br />
HOWEVER, they may ONLY start with a letter or an underscore ( _ ). It<br />
is also case sensitive so a and A are not the same thing. To use a variable<br />
we define it as "var ". Meaning it starts with "var" and then the variable name. <br />
<br />
An example: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
<br />
var x = "some text"; <br />
// i called the variable x. <br />
// I made it a text based variable<br />
//and then ended it with a semi colon. And now to use it practically<br />
<br />
alert(x);<br />
<br />
&lt;/script&gt;</code></div></div>
<br />
The way they can be used is almost pretty much infinite in my opinion. <br />
There's a lot more ways to show you this that would look cooler and make<br />
more sense, but...it's not like we're learning anything too complex yet, so<br />
for now I'll leave it at this. And now to move on to the part that really<br />
gives JS some power. Statements. if, if..else and so on. But today we're<br />
only going to cover those 2, if and if...else. <br />
<br />
The if statement basically states "if blah is equal to blah" then execute<br />
blahhh. Or you could do "if blah is blah, execute blahh". It's probably easier<br />
to just show you. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;script type="text/javascript"&gt;<br />
<br />
var x = 5<br />
<br />
if ( x == 1 ) {<br />
alert("No freaking way");<br />
} <br />
// --<br />
//this is how to use if else<br />
if ( x == 2 ) {<br />
alert("bs") <br />
} else {<br />
alert("Yeah, thought so. 5 does not equal 2");<br />
}<br />
&lt;/script&gt;</code></div></div>
<br />
There we saw the if statement, and how the else statement is used. <br />
-----<br />
<br />
Let me guys know if you don't get anything. or have any suggestions. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 6: CSS Basics Ending.]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1678</link>
			<pubDate>Thu, 05 Apr 2012 21:28:52 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1678</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
----<br />
<br />
Alright guys, this will be the last lesson in the CSS set. So try to bare with<br />
me here. I know CSS can be boring but I promise, if you can bare with me<br />
just a bit more, we'll get into some more fun stuff. Alright? <br />
<br />
So picking up where we left off, one of the first things we'll be going over<br />
is borders. Yup borders. There are 8 types of borders, -&gt; <br />
None, Dotted, Dashed, Solid, Ridged, Groove, Double, Outset and Inset.<br />
<br />
And there are 4 ways to use them, top, bottom, left and right. OR you <br />
could just use the "all round" one which is just "border". So to recap there's<br />
border-left, border-right, border-top, border-bottom. And yes you have to<br />
use lowercase and the dashes. <br />
Here's an example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.one {<br />
border-style:solid;<br />
border-color:red;<br />
}<br />
<br />
p.two {<br />
border-style:solid;<br />
border-color:blue; /* Border-color doesn't work alone though */<br />
}</code></div></div>
--<br />
<br />
Another easy thing we'll cover is, margin. Margin is kinda where the edges<br />
will be set. It's sorta what defines how far the element can go. There are<br />
4 ways to use margin that is, margin-top, margin-bottom, margin-left, <br />
margin-right. Just like the borders yup. But you can also use the all <br />
rounder thing here too. Just use "margin". <br />
Here's an example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.one {<br />
margin-top:100px;<br />
margin-bottom:100px;<br />
margin-right:50px;<br />
margin-left:50px;<br />
}</code></div></div>
<br />
Another thing to know about margin is you can use something called <br />
Auto margin. What I mean by this, is there are 3 ways to define a margin. <br />
You can use "margin: auto" "margin: #%" where you replace number with<br />
anything from 1-100. And then "margin: #px" where the # is anything from<br />
1-100. <br />
<br />
Another thing we can vary is something called "padding". And like the <br />
above 2, it too has a top, bottom, left and right side. Which we can <br />
manipulate using px or %. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.one {<br />
padding-top:25px;<br />
padding-bottom:25px;<br />
padding-right:50px;<br />
padding-left:50px;<br />
}</code></div></div>
<br />
One really neat thing about CSS is the ability to either hide, or ghost an<br />
element from view. That probably doesn't make sense, so another way to<br />
go about this is to tell you, there is something called a visibility element.<br />
You can set this to 2 things. Hidden or none. If you put it on hidden, the<br />
element still affects the page and takes up the space it's been given.<br />
Whereas, if you put it to none, it not affect the page nor take up space. <br />
It will simply just be that. Not there. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1.hidden {visibility:hidden;} /* hides from page but still takes up room */<br />
h2.hidden {visibility:none;} /* is removed from page and doesn't affect it. */</code></div></div>
<br />
To go along with that there are things in CSS called inline elements and<br />
block elements. Every CSS tag fits one. A block element will take up more<br />
space than needed as it forces a line break above and below. Whereas an<br />
inline element will take up only as much space as needed. An example of<br />
a block element is &lt;h1&gt;&lt;div&gt;&lt;p&gt; and so on. An example of an inline <br />
element is &lt;a&gt; and &lt;span&gt;. This affect can be seen when you use them<br />
practically. <br />
<br />
To set a usually block element to inline or vice versa is simple enough<br />
though. Simply::<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>li {display:inline;}<br />
span {display:block;}</code></div></div>
Set the display to anything you like. <br />
---<br />
Don't worry guys. Almost done with the boring stuff. <br />
<br />
In CSS you can "position" an element based on a number of things. And <br />
most of them aren't affected by the top, bottom, right and left properties.<br />
These "positions" are called, static positioning, relative positioning, fixed <br />
positioning, and absolute positioning. <br />
<br />
Static positioning is default for all elements. This is how the page normally<br />
flows. Relative means it will be in a relative position differing from it's <br />
normal one, but it can also overlap other elements so long as it keeps a <br />
little space to itself. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1.left {<br />
position:relative;<br />
left:-20px;<br />
}<br />
<br />
}</code></div></div>
<br />
Fixed positioning means it will stay where it's at no matter if you scroll the<br />
page any direction you wish or blow up the internet. It's staying right<br />
where it's at. It's not moving. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p1.fixed {<br />
position:fixed;<br />
top:30px;<br />
right:5px;<br />
}</code></div></div>
<br />
Absolute positioning means an absolute position element is positioned<br />
relative to the first parent element that has a position other than static.<br />
If no such element is found, the containing block is &lt;html&gt;. But most times<br />
this doesn't happen. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h2 {<br />
position:absolute;<br />
left:100px;<br />
top:150px;<br />
}</code></div></div>
<br />
And lastly for positioning, it is possible to over lap an element but you have<br />
to use something called a z index. It may sound weird to you, so you don't<br />
have to worry about it too much. But here's a practical example. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>img {<br />
position:absolute;<br />
left:0px;<br />
top:0px;<br />
z-index:-1 <br />
}</code></div></div>
<br />
A cool thing you can do in CSS is have the ability to make things float. <br />
And not, I'm not screwing with you. You can literally make it float. Either<br />
to the left or the right though, not the top or bottom or some weird <br />
diagonal polymorphic crap. But if you use float you also allow other <br />
elements the ability to "wrap" around the other ones. This is most often <br />
seen in an image gallery. To make an image float you simply just tell it to <br />
float. when it does it will go as far right/left as it can. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>img {<br />
float:right;<br />
}</code></div></div>
<br />
If you float an image, any following text will wrap around to the left. <br />
It can be a pretty neat affect if used right. You can also float things <br />
together at once, if you allow it some room. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>.thumbnail {<br />
float:left;<br />
width:110px;<br />
height:90px;<br />
margin:5px;<br />
}</code></div></div>
<br />
And there we have it. I promised it wouldn't be much longer and it wasn't. <br />
There is some other stuff on CSS which you can check out W3, But<br />
honestly I don't see them as important or needed as it's never used (ever) <br />
or they practically give you the source code to nav bar, image gallery<br />
and so on. <br />
<br />
And this is the end of the lesson set for CSS. So the next time we meet<br />
it be loads of fun because next we'll be learning how to screw with some<br />
client side scripting and mess with browsers. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1677" target="_blank">VWBC Lesson 5</a><br />
----<br />
<br />
Alright guys, this will be the last lesson in the CSS set. So try to bare with<br />
me here. I know CSS can be boring but I promise, if you can bare with me<br />
just a bit more, we'll get into some more fun stuff. Alright? <br />
<br />
So picking up where we left off, one of the first things we'll be going over<br />
is borders. Yup borders. There are 8 types of borders, -&gt; <br />
None, Dotted, Dashed, Solid, Ridged, Groove, Double, Outset and Inset.<br />
<br />
And there are 4 ways to use them, top, bottom, left and right. OR you <br />
could just use the "all round" one which is just "border". So to recap there's<br />
border-left, border-right, border-top, border-bottom. And yes you have to<br />
use lowercase and the dashes. <br />
Here's an example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.one {<br />
border-style:solid;<br />
border-color:red;<br />
}<br />
<br />
p.two {<br />
border-style:solid;<br />
border-color:blue; /* Border-color doesn't work alone though */<br />
}</code></div></div>
--<br />
<br />
Another easy thing we'll cover is, margin. Margin is kinda where the edges<br />
will be set. It's sorta what defines how far the element can go. There are<br />
4 ways to use margin that is, margin-top, margin-bottom, margin-left, <br />
margin-right. Just like the borders yup. But you can also use the all <br />
rounder thing here too. Just use "margin". <br />
Here's an example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.one {<br />
margin-top:100px;<br />
margin-bottom:100px;<br />
margin-right:50px;<br />
margin-left:50px;<br />
}</code></div></div>
<br />
Another thing to know about margin is you can use something called <br />
Auto margin. What I mean by this, is there are 3 ways to define a margin. <br />
You can use "margin: auto" "margin: #%" where you replace number with<br />
anything from 1-100. And then "margin: #px" where the # is anything from<br />
1-100. <br />
<br />
Another thing we can vary is something called "padding". And like the <br />
above 2, it too has a top, bottom, left and right side. Which we can <br />
manipulate using px or %. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.one {<br />
padding-top:25px;<br />
padding-bottom:25px;<br />
padding-right:50px;<br />
padding-left:50px;<br />
}</code></div></div>
<br />
One really neat thing about CSS is the ability to either hide, or ghost an<br />
element from view. That probably doesn't make sense, so another way to<br />
go about this is to tell you, there is something called a visibility element.<br />
You can set this to 2 things. Hidden or none. If you put it on hidden, the<br />
element still affects the page and takes up the space it's been given.<br />
Whereas, if you put it to none, it not affect the page nor take up space. <br />
It will simply just be that. Not there. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1.hidden {visibility:hidden;} /* hides from page but still takes up room */<br />
h2.hidden {visibility:none;} /* is removed from page and doesn't affect it. */</code></div></div>
<br />
To go along with that there are things in CSS called inline elements and<br />
block elements. Every CSS tag fits one. A block element will take up more<br />
space than needed as it forces a line break above and below. Whereas an<br />
inline element will take up only as much space as needed. An example of<br />
a block element is &lt;h1&gt;&lt;div&gt;&lt;p&gt; and so on. An example of an inline <br />
element is &lt;a&gt; and &lt;span&gt;. This affect can be seen when you use them<br />
practically. <br />
<br />
To set a usually block element to inline or vice versa is simple enough<br />
though. Simply::<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>li {display:inline;}<br />
span {display:block;}</code></div></div>
Set the display to anything you like. <br />
---<br />
Don't worry guys. Almost done with the boring stuff. <br />
<br />
In CSS you can "position" an element based on a number of things. And <br />
most of them aren't affected by the top, bottom, right and left properties.<br />
These "positions" are called, static positioning, relative positioning, fixed <br />
positioning, and absolute positioning. <br />
<br />
Static positioning is default for all elements. This is how the page normally<br />
flows. Relative means it will be in a relative position differing from it's <br />
normal one, but it can also overlap other elements so long as it keeps a <br />
little space to itself. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1.left {<br />
position:relative;<br />
left:-20px;<br />
}<br />
<br />
}</code></div></div>
<br />
Fixed positioning means it will stay where it's at no matter if you scroll the<br />
page any direction you wish or blow up the internet. It's staying right<br />
where it's at. It's not moving. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p1.fixed {<br />
position:fixed;<br />
top:30px;<br />
right:5px;<br />
}</code></div></div>
<br />
Absolute positioning means an absolute position element is positioned<br />
relative to the first parent element that has a position other than static.<br />
If no such element is found, the containing block is &lt;html&gt;. But most times<br />
this doesn't happen. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h2 {<br />
position:absolute;<br />
left:100px;<br />
top:150px;<br />
}</code></div></div>
<br />
And lastly for positioning, it is possible to over lap an element but you have<br />
to use something called a z index. It may sound weird to you, so you don't<br />
have to worry about it too much. But here's a practical example. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>img {<br />
position:absolute;<br />
left:0px;<br />
top:0px;<br />
z-index:-1 <br />
}</code></div></div>
<br />
A cool thing you can do in CSS is have the ability to make things float. <br />
And not, I'm not screwing with you. You can literally make it float. Either<br />
to the left or the right though, not the top or bottom or some weird <br />
diagonal polymorphic crap. But if you use float you also allow other <br />
elements the ability to "wrap" around the other ones. This is most often <br />
seen in an image gallery. To make an image float you simply just tell it to <br />
float. when it does it will go as far right/left as it can. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>img {<br />
float:right;<br />
}</code></div></div>
<br />
If you float an image, any following text will wrap around to the left. <br />
It can be a pretty neat affect if used right. You can also float things <br />
together at once, if you allow it some room. <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>.thumbnail {<br />
float:left;<br />
width:110px;<br />
height:90px;<br />
margin:5px;<br />
}</code></div></div>
<br />
And there we have it. I promised it wouldn't be much longer and it wasn't. <br />
There is some other stuff on CSS which you can check out W3, But<br />
honestly I don't see them as important or needed as it's never used (ever) <br />
or they practically give you the source code to nav bar, image gallery<br />
and so on. <br />
<br />
And this is the end of the lesson set for CSS. So the next time we meet<br />
it be loads of fun because next we'll be learning how to screw with some<br />
client side scripting and mess with browsers. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 5: CSS Basics Continued]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1677</link>
			<pubDate>Thu, 05 Apr 2012 21:24:17 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1677</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
----<br />
<br />
Continuing where we left off from; Last time we got a toes barely wet <br />
and learned a fair bit of CSS. So, now let's pour on the floods. <br />
<br />
The first thing we'll go over today is, Id Selectors revisited. One thing<br />
I forgot to mention, was the fact you can make specific styles for specific<br />
HTML elements by making a unique Id Selector. And to do this, in the <br />
style sheet you add: "#" and then after that the Id Selector's name. <br />
<br />
Example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>#bswtf {<br />
text-align:left;<br />
color:green;<br />
}</code></div></div>
 Now, anything I give the Id of bswtf, will have it's text aligned left<br />
and the color green. An example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form id="bswtf" method="get" action="moo.php"&gt;<br />
...<br />
&lt;/form&gt;</code></div></div>
--<br />
<br />
Now we can move on to CSS properties. And to start we'll be going over<br />
Background properties. There are 5 of them. Those being: <br />
background-color, background-image, background-repeat, background-attachment, background-position<br />
---<br />
<br />
How can we use these? Well let's start by understanding what these <br />
properties do in the first place. <br />
background-color, as you can imagine specifies color. You can use 3 types. <br />
Hex, Color name or RGB. Personally I prefer the first 2. And most times, it's<br />
the Hex value being used. <br />
<br />
background-image, is well another obvious one. It specifies an image to <br />
be used.<br />
background-repeat, makes a image tile, or repeat either vertically or <br />
horizontally. <br />
background-attachment, depicts whether or not the image will be moving<br />
with the page, or stay in one spot. Ever see a website where the background<br />
looked like it was scrolling with you. That's probably because it was. <br />
And lastly,<br />
background-position, defines where the starting point is. <br />
<br />
You should only use one of these attribute per element when<br />
displaying it. Never try to use multiple ones. That just creates mayhem for you. <br />
<br />
Another important thing to cover is the text values. <br />
<br />
color - Sets the color of text<br />
direction - Specifies the text direction<br />
text-align - Specifies the alignment of text<br />
text-decoration - Specifies the decoration<br />
text-indent - Specifies the indentation in a text-block<br />
text-shadow - Specifies the effect added to text<br />
<br />
While there are more, I will only cover those. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p {text-indent:50px;}</code></div></div>
 <br />
Is the way to indent text. The 50 is the number you want to change. <br />
However, don't make it any random number. This number is based on pixels. <br />
<br />
1 pixel isn't much, where as 100 is. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>a {text-decoration:none;}</code></div></div>
This basically says, the text decoration is nothing right now. However<br />
you can change the word none to "blink""shadow" and a couple others<br />
I know of. However I don't know the entire list. Sorry. You could prob<br />
find it though. Blink and shadow are the most used. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1 {text-align:center;} /* Anything in H1 will be aligned to the<br />
center */<br />
p.date {text-align:right;} /* anything with the element, p.date will be<br />
aligned right */<br />
p.main {text-align:justify;} /* anything with the element p.main will be<br />
justified */</code></div></div>
<br />
Now color, color is a funny thing. You can define color 3 different ways. <br />
That would be the actual name, hex value, or RGB value. I don't suggest<br />
RGB value, that's just too much work. The most common is hex color. <br />
So I suggest that one. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>body {color:blue;} /* Actual color name */<br />
h1 {color:#00ff00;} /* Using hex value */</code></div></div>
<br />
Moving along, the next thing we can specify in CSS is font. that's right<br />
we can do cool stuff to font now. such as controling it's size, type, and<br />
color. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.normal {font-style:normal;} /*makes text normal */<br />
p.italic {font-style:italic;} /*makes text italic */<br />
p.bold {font-style:bold;} /* makes text bold */<br />
<br />
h1 {font-size:40px;} /*makes font size 40 for h1 */<br />
h2 {font-size:30px;} /*makes font size 30 for h2 */<br />
p {font-size:14px;} /*makes font size 14 for p */<br />
<br />
p{font-family:"Times New Roman", Times, serif;} /* makes the font times new roman, if not support by browser, then times, then serif */</code></div></div>
<br />
The thing about, fonts, is simple. You can use EM, however I don't suggest<br />
it. It's just too much work. It was recommended to stop the IE problem <br />
though. To do EM you take the amount of pixel, such as say 16 pixels, and divide by 16. <br />
Since 16 is the normal size. 1 em = 16 pixel. therefor, 2em is 32 pixels.<br />
Get it? Take your pixel amount. Divide it by 16, thats your EM number. <br />
You can have decimals too if you'd like. <br />
<br />
The font family attribute is messy though. Sometimes, unless you're going<br />
for a specific effect just leave it out and browsers will default it's own. <br />
But if youw ant to use it, then any font family longer than one word must<br />
be in quotes, and it's highly suggested to put more after that first one<br />
separated by commas, as sort of back ups incase the first one is supported.<br />
<br />
The next thing we're going to learn to play with is links. Yup. The things you<br />
click everyday (well, i think). <br />
<br />
There are only 4 type of link attributes, that I know of. There could be more<br />
I honestly don't know. I'll look into it later. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>a:link {color:#FF0000;}&nbsp;&nbsp;/* unvisited link */<br />
a:visited {color:#00FF00;}&nbsp;&nbsp;/* visited link */<br />
a:hover {color:#FF00FF;}&nbsp;&nbsp;/* mouse over link */<br />
a:active {color:#0000FF;}&nbsp;&nbsp;/* selected link */</code></div></div>
<br />
You can set the colors, to each one And you can do other things to those<br />
links such as decoration, size, or anything else really. So long as it's enclosed<br />
in those {}. <br />
<br />
When setting the style for several link states, there are some order rules:<br />
a:hover MUST come after a:link and a:visited<br />
a:active MUST come after a:hover<br />
<br />
I don't know why. I really don't. But, that's what I learned and I did try it<br />
myself. And it didn't work, so I can't tell you why it does that. Sorry. <br />
<br />
Rolling right into the CSS list attributes. <br />
There are 2 types of list, UL and OL. Which is Unordered and Ordered lists. <br />
We learned about those in HTML, not lets use them in CSS. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>ul.a {list-style-type: circle;} /*defines type of point */<br />
ul.b {list-style-type: square;} /*defines type of point */<br />
<br />
ol.c {list-style-type: upper-roman;} /*defines type of point */<br />
ol.d {list-style-type: lower-alpha;} /*defines type of point */</code></div></div>
 <br />
<br />
Noticed how they were ordered? ul.a ul.b and so on. That's how the <br />
ordering goes. same for the ordered list as well. You can add styles<br />
to those list though, bg color, size, decoration, color and so on. Just<br />
don't over use them. Then it just looks crappy. You can also use images<br />
if you like, by doing this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>ul {<br />
list-style-image: url('example.gif');<br />
}</code></div></div>
<br />
The last thing we'll go over today in this class before I hit the character<br />
limit is tables. There are few things you can do with tables to make cool<br />
pages. However, I will only go over certain ones, the ones most used. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>table, th, td<br />
{<br />
border: 1px solid black;<br />
}</code></div></div>
<br />
In the above example, table, th and td have a border because they're all<br />
nested together. To do sep borders, just separate them. As always you can<br />
change the number, and the color. Here I'm specifying height and width. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>table {<br />
width:50px;<br />
}<br />
th {<br />
height:50px;<br />
}</code></div></div>
<br />
Basically just like HTML. The values being height and width, then the <br />
numbers, which can be changed. you can do this to any element, th, td, tr<br />
table and so on. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>td {<br />
text-align:right; /* this will makes the text in this element right aligned */<br />
}</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>td {<br />
padding:15px; /* this will make the td element had 15 pixels of padding. <br />
}</code></div></div>
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>table, td, th {<br />
border:1px solid green; /* Gives all 3 elements, 1pixel border and making it green */<br />
}<br />
th {<br />
background-color:green; /*makes background color green on the element */<br />
color:white; /*but everything else white */<br />
}</code></div></div>
<br />
And that is all there is need to know about how tables work in CSS. <br />
<br />
I will admit however I may re-write this class. I am extremely tired and<br />
I didn't want to make you guys wait any longer for the class. I know the <br />
server roll back and the hacked thing, isn't really helping much, but yeah<br />
im tired. So, if you find any mistakes, please let me know. And if you think<br />
something needs more explaining, let me know as well please. <br />
<br />
The next class will probably be just as big. Maybe smaller, but we're almost<br />
done with the CSS class set. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1676" target="_blank">VWBC Lesson 4</a><br />
----<br />
<br />
Continuing where we left off from; Last time we got a toes barely wet <br />
and learned a fair bit of CSS. So, now let's pour on the floods. <br />
<br />
The first thing we'll go over today is, Id Selectors revisited. One thing<br />
I forgot to mention, was the fact you can make specific styles for specific<br />
HTML elements by making a unique Id Selector. And to do this, in the <br />
style sheet you add: "#" and then after that the Id Selector's name. <br />
<br />
Example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>#bswtf {<br />
text-align:left;<br />
color:green;<br />
}</code></div></div>
 Now, anything I give the Id of bswtf, will have it's text aligned left<br />
and the color green. An example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form id="bswtf" method="get" action="moo.php"&gt;<br />
...<br />
&lt;/form&gt;</code></div></div>
--<br />
<br />
Now we can move on to CSS properties. And to start we'll be going over<br />
Background properties. There are 5 of them. Those being: <br />
background-color, background-image, background-repeat, background-attachment, background-position<br />
---<br />
<br />
How can we use these? Well let's start by understanding what these <br />
properties do in the first place. <br />
background-color, as you can imagine specifies color. You can use 3 types. <br />
Hex, Color name or RGB. Personally I prefer the first 2. And most times, it's<br />
the Hex value being used. <br />
<br />
background-image, is well another obvious one. It specifies an image to <br />
be used.<br />
background-repeat, makes a image tile, or repeat either vertically or <br />
horizontally. <br />
background-attachment, depicts whether or not the image will be moving<br />
with the page, or stay in one spot. Ever see a website where the background<br />
looked like it was scrolling with you. That's probably because it was. <br />
And lastly,<br />
background-position, defines where the starting point is. <br />
<br />
You should only use one of these attribute per element when<br />
displaying it. Never try to use multiple ones. That just creates mayhem for you. <br />
<br />
Another important thing to cover is the text values. <br />
<br />
color - Sets the color of text<br />
direction - Specifies the text direction<br />
text-align - Specifies the alignment of text<br />
text-decoration - Specifies the decoration<br />
text-indent - Specifies the indentation in a text-block<br />
text-shadow - Specifies the effect added to text<br />
<br />
While there are more, I will only cover those. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p {text-indent:50px;}</code></div></div>
 <br />
Is the way to indent text. The 50 is the number you want to change. <br />
However, don't make it any random number. This number is based on pixels. <br />
<br />
1 pixel isn't much, where as 100 is. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>a {text-decoration:none;}</code></div></div>
This basically says, the text decoration is nothing right now. However<br />
you can change the word none to "blink""shadow" and a couple others<br />
I know of. However I don't know the entire list. Sorry. You could prob<br />
find it though. Blink and shadow are the most used. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1 {text-align:center;} /* Anything in H1 will be aligned to the<br />
center */<br />
p.date {text-align:right;} /* anything with the element, p.date will be<br />
aligned right */<br />
p.main {text-align:justify;} /* anything with the element p.main will be<br />
justified */</code></div></div>
<br />
Now color, color is a funny thing. You can define color 3 different ways. <br />
That would be the actual name, hex value, or RGB value. I don't suggest<br />
RGB value, that's just too much work. The most common is hex color. <br />
So I suggest that one. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>body {color:blue;} /* Actual color name */<br />
h1 {color:#00ff00;} /* Using hex value */</code></div></div>
<br />
Moving along, the next thing we can specify in CSS is font. that's right<br />
we can do cool stuff to font now. such as controling it's size, type, and<br />
color. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.normal {font-style:normal;} /*makes text normal */<br />
p.italic {font-style:italic;} /*makes text italic */<br />
p.bold {font-style:bold;} /* makes text bold */<br />
<br />
h1 {font-size:40px;} /*makes font size 40 for h1 */<br />
h2 {font-size:30px;} /*makes font size 30 for h2 */<br />
p {font-size:14px;} /*makes font size 14 for p */<br />
<br />
p{font-family:"Times New Roman", Times, serif;} /* makes the font times new roman, if not support by browser, then times, then serif */</code></div></div>
<br />
The thing about, fonts, is simple. You can use EM, however I don't suggest<br />
it. It's just too much work. It was recommended to stop the IE problem <br />
though. To do EM you take the amount of pixel, such as say 16 pixels, and divide by 16. <br />
Since 16 is the normal size. 1 em = 16 pixel. therefor, 2em is 32 pixels.<br />
Get it? Take your pixel amount. Divide it by 16, thats your EM number. <br />
You can have decimals too if you'd like. <br />
<br />
The font family attribute is messy though. Sometimes, unless you're going<br />
for a specific effect just leave it out and browsers will default it's own. <br />
But if youw ant to use it, then any font family longer than one word must<br />
be in quotes, and it's highly suggested to put more after that first one<br />
separated by commas, as sort of back ups incase the first one is supported.<br />
<br />
The next thing we're going to learn to play with is links. Yup. The things you<br />
click everyday (well, i think). <br />
<br />
There are only 4 type of link attributes, that I know of. There could be more<br />
I honestly don't know. I'll look into it later. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>a:link {color:#FF0000;}&nbsp;&nbsp;/* unvisited link */<br />
a:visited {color:#00FF00;}&nbsp;&nbsp;/* visited link */<br />
a:hover {color:#FF00FF;}&nbsp;&nbsp;/* mouse over link */<br />
a:active {color:#0000FF;}&nbsp;&nbsp;/* selected link */</code></div></div>
<br />
You can set the colors, to each one And you can do other things to those<br />
links such as decoration, size, or anything else really. So long as it's enclosed<br />
in those {}. <br />
<br />
When setting the style for several link states, there are some order rules:<br />
a:hover MUST come after a:link and a:visited<br />
a:active MUST come after a:hover<br />
<br />
I don't know why. I really don't. But, that's what I learned and I did try it<br />
myself. And it didn't work, so I can't tell you why it does that. Sorry. <br />
<br />
Rolling right into the CSS list attributes. <br />
There are 2 types of list, UL and OL. Which is Unordered and Ordered lists. <br />
We learned about those in HTML, not lets use them in CSS. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>ul.a {list-style-type: circle;} /*defines type of point */<br />
ul.b {list-style-type: square;} /*defines type of point */<br />
<br />
ol.c {list-style-type: upper-roman;} /*defines type of point */<br />
ol.d {list-style-type: lower-alpha;} /*defines type of point */</code></div></div>
 <br />
<br />
Noticed how they were ordered? ul.a ul.b and so on. That's how the <br />
ordering goes. same for the ordered list as well. You can add styles<br />
to those list though, bg color, size, decoration, color and so on. Just<br />
don't over use them. Then it just looks crappy. You can also use images<br />
if you like, by doing this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>ul {<br />
list-style-image: url('example.gif');<br />
}</code></div></div>
<br />
The last thing we'll go over today in this class before I hit the character<br />
limit is tables. There are few things you can do with tables to make cool<br />
pages. However, I will only go over certain ones, the ones most used. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>table, th, td<br />
{<br />
border: 1px solid black;<br />
}</code></div></div>
<br />
In the above example, table, th and td have a border because they're all<br />
nested together. To do sep borders, just separate them. As always you can<br />
change the number, and the color. Here I'm specifying height and width. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>table {<br />
width:50px;<br />
}<br />
th {<br />
height:50px;<br />
}</code></div></div>
<br />
Basically just like HTML. The values being height and width, then the <br />
numbers, which can be changed. you can do this to any element, th, td, tr<br />
table and so on. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>td {<br />
text-align:right; /* this will makes the text in this element right aligned */<br />
}</code></div></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>td {<br />
padding:15px; /* this will make the td element had 15 pixels of padding. <br />
}</code></div></div>
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>table, td, th {<br />
border:1px solid green; /* Gives all 3 elements, 1pixel border and making it green */<br />
}<br />
th {<br />
background-color:green; /*makes background color green on the element */<br />
color:white; /*but everything else white */<br />
}</code></div></div>
<br />
And that is all there is need to know about how tables work in CSS. <br />
<br />
I will admit however I may re-write this class. I am extremely tired and<br />
I didn't want to make you guys wait any longer for the class. I know the <br />
server roll back and the hacked thing, isn't really helping much, but yeah<br />
im tired. So, if you find any mistakes, please let me know. And if you think<br />
something needs more explaining, let me know as well please. <br />
<br />
The next class will probably be just as big. Maybe smaller, but we're almost<br />
done with the CSS class set. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 4: CSS Basics]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1676</link>
			<pubDate>Thu, 05 Apr 2012 21:10:57 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1676</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
----<br />
<br />
A note before I start. If ever you don't understand something. Or would<br />
want more help/explanation. Don't be afraid to ask. Either in thread or PM.<br />
--<br />
<br />
Thanks for coming to the 4th lesson in this series. Today is only a CSS Intro<br />
to get your toes wet. And the next will flood over you. So hopefully you're<br />
ready for it. I've decided that easy new segment. I will make an intro first<br />
to get your toes wet. And that way you can ease yourself into by at least<br />
having SOME expectation of what's to come. <br />
<br />
That having been said. Let's start. The first thing about CSS you should <br />
know is. Is that CSS is literally just styling. That's all. There's no forms, <br />
there's no actions. There's nothing to it, except styles. This is correspondent<br />
to it's name. Cascading Style Sheets. (CSS).<br />
<br />
One thing you should know about CSS is, it's was primarily made to help<br />
define styles to HTML elements. Apparently people thought that using HTML<br />
to style stuff took too long and was a pain in the ass. So someone made up<br />
CSS as a solution. Which is all fine and dandy for us. <br />
<br />
There are 3 types of CSS. External Sheets. Internal Style Sheets. And<br />
inline CSS. <br />
<br />
The way to invoke these 3 types is this way: <br />
External Style Sheet Invoke Example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;head&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="link/to/css.css" /&gt;<br />
&lt;/head&gt;</code></div></div>
<br />
The external style sheet can be made however you like, notepad<br />
wordpad, notepad++, pft even word if you want. An example of what <br />
an external sheet would look like is this: <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1 {<br />
color:sienna;<br />
}<br />
<br />
h2 {<br />
margin-left:20px;<br />
}<br />
<br />
body {<br />
background-image:url("images/bg.png");<br />
}</code></div></div>
<br />
With no style tags or any tags really. Also, you don't have to style it<br />
like I just did. That's personal preference. I like my stuff to look neat. <br />
As an example of another way you could do it is: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1 {color:white;}<br />
h2 {margin-left:15px;}<br />
body {background-image:url("images/bg.png");}</code></div></div>
<br />
You can have it stacked like that. That's not it either. If you really <br />
wanted to. You could do this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1 {color:white;} h2 {margin-left:15px;} body {background-image:url("images/bg.png");}</code></div></div>
You could have it smashed together. Just. Don't do it on my assignments<br />
please. It's bothers the FUCK out of me. I find it annoying as crap. <br />
<br />
Now then. All External Style Sheets, end in .css and as far as I'm aware<br />
I've never seen it linked in anything but head tags. So, until I test it, when<br />
ever that may be. Always put the rel link in the head tags. <br />
<br />
Internal Style Sheet Invoke Example:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;head&gt;<br />
&lt;style type="text/css"&gt;<br />
h1 {<br />
color:white ;<br />
}<br />
<br />
h2 {<br />
margin-left:15px;<br />
}<br />
<br />
body {<br />
background-image:url("images/bg.png");<br />
}<br />
&lt;/style&gt;<br />
&lt;/head&gt;</code></div></div>
<br />
That's internal styling. And like above, you don't have to do it like I did. <br />
You could do it stacked, or smashed. I just like mine neat. Another thing<br />
about internal styling is that you can do it in the body tags as well. Doesn't<br />
have to be just the head tags. <br />
<br />
The last example is for inline styling. <br />
Inline Styling Invoke Example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;p style="color:white;margin-left:15px"&gt;Test test test test test.&lt;/p&gt;</code></div></div>
<br />
Kind of like the HTML styling. However. I don't suggest this method. It's<br />
long. Tedious and over all just annoying. And I don't see a use for it. <br />
---<br />
<br />
Out of all the styles, I suggest External the most. Unless you're doing literally<br />
just a small small thing. In that case using Internal Styling. <br />
<br />
--<br />
<br />
In CSS there is only ONE way to comment and that is to use the block<br />
comment type. Which is this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>/*<br />
A block comment<br />
*/</code></div></div>
<br />
----<br />
<br />
Another trivia to know is that in CSS. There are literally almost just 2 parts<br />
to it. A selector. And then deceleration(s). An example is this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;p style="color:white;margin-left:15px"&gt;</code></div></div>
In the above example. The &lt;p&gt; would be the selector. And the <br />
color:white would be the deceleration. In the deceleration. There are 2<br />
parts in the deceleration. That would be the property and then the value. <br />
Color is the property. White is the value. You can technically have as many<br />
decelerations as you like. However I suggest only using a max of maybe <br />
3-4 in one selector. <br />
<br />
If anyone had a hard time understanding that, it's fine. Because really, it<br />
shouldn't matter to you right now anyway. It's really just a bunch of trivia<br />
that's neat to know. So don't worry yourself over it, if none of that made<br />
sense to you.<br />
<br />
---<br />
<br />
Now. What really makes CSS powerful is the ability to style select elements<br />
the way YOU want. There's a neat way to do this too. And that's with <br />
something called "Id" and "Class". You can mention/specify these Id's and<br />
Class's in the HTML code. Like so: <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form class=ClassName action=moo.php&nbsp;&nbsp;method=get&gt;<br />
...<br />
&lt;/form&gt;</code></div></div>
<br />
However, NEVER use a number in an Id or Class. It won't work in some<br />
browsers. Such as FireFox. <br />
----<br />
<br />
How to define a Id or Class in a Style Sheet is like so, <br />
The class uses the HTML class attribute, and is defined with a dot. (".")<br />
All HTML elements with class="center" will be center-aligned In the example<br />
below. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>.center {<br />
text-align:center;<br />
}</code></div></div>
<br />
Here's an example of how it's used practically. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form class="center" method="get" action="action.php"&gt;<br />
...<br />
&lt;/form&gt;</code></div></div>
---<br />
<br />
You can also specify that only specific HTML be affected by a class/id.<br />
all p elements with class="center" will be center-aligned like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.center {<br />
text-align:center;<br />
}</code></div></div>
<br />
Now you may have noticed. I haven't been putting a space between the<br />
property and the value. That's because you don't have to. But you can if<br />
you want. And most times I do. <br />
---<br />
<br />
Now this may be a bit advanced for something that's only being used to<br />
get your toes wet, but, in CSS another thing that makes it so great is<br />
the ability to group, and nest selectors together. Here's an example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1, h2, h3 {<br />
color: blue<br />
}</code></div></div>
<br />
Notice that? Anything that's in h1, h2 and h3 will have the color blue now. <br />
So instead of doing separate things for all 3 selectors. We condensed it into<br />
one. You can do this for mismatched selectors too. They don't have to be<br />
the same. An example is :<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1, p, b, h3 {<br />
color: blue<br />
}</code></div></div>
<br />
And our last thing for today is something called Nesting. That's right we <br />
can nest selectors. For example, if you wanted to make all &lt;p&gt; blue, but<br />
the specified ones green. You would Nest it. Like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p {<br />
color:blue;<br />
text-align:center;<br />
}<br />
<br />
.specified {<br />
background-color:blue;<br />
}<br />
<br />
.specified p {<br />
color:white;<br />
}</code></div></div>
<br />
Alright class. That will be the end of this lesson. That was just to get<br />
your toes wet. The next one will be larger. And I may have to double post<br />
Lol. <br />
<br />
So try not to run away. I promise, if you can get past all the boring stuff<br />
first. We'll get to the fun stuff like PHP, Servers, DB's , Security and so on. <br />
But with all good things you have to know the basic stuff first. <br />
<br />
Remember, any comments or suggestions you have are welcomed. Feel free<br />
to invite any of your friends. <br />
<br />
A copy of this class be found here: <br />
<a href="http://thehallowlife.com/webinar/lessons/class4.txt" target="_blank">http://thehallowlife.com/webinar/lessons/class4.txt</a><br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1675" target="_blank">VWBC Lesson 3</a><br />
----<br />
<br />
A note before I start. If ever you don't understand something. Or would<br />
want more help/explanation. Don't be afraid to ask. Either in thread or PM.<br />
--<br />
<br />
Thanks for coming to the 4th lesson in this series. Today is only a CSS Intro<br />
to get your toes wet. And the next will flood over you. So hopefully you're<br />
ready for it. I've decided that easy new segment. I will make an intro first<br />
to get your toes wet. And that way you can ease yourself into by at least<br />
having SOME expectation of what's to come. <br />
<br />
That having been said. Let's start. The first thing about CSS you should <br />
know is. Is that CSS is literally just styling. That's all. There's no forms, <br />
there's no actions. There's nothing to it, except styles. This is correspondent<br />
to it's name. Cascading Style Sheets. (CSS).<br />
<br />
One thing you should know about CSS is, it's was primarily made to help<br />
define styles to HTML elements. Apparently people thought that using HTML<br />
to style stuff took too long and was a pain in the ass. So someone made up<br />
CSS as a solution. Which is all fine and dandy for us. <br />
<br />
There are 3 types of CSS. External Sheets. Internal Style Sheets. And<br />
inline CSS. <br />
<br />
The way to invoke these 3 types is this way: <br />
External Style Sheet Invoke Example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;head&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="link/to/css.css" /&gt;<br />
&lt;/head&gt;</code></div></div>
<br />
The external style sheet can be made however you like, notepad<br />
wordpad, notepad++, pft even word if you want. An example of what <br />
an external sheet would look like is this: <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1 {<br />
color:sienna;<br />
}<br />
<br />
h2 {<br />
margin-left:20px;<br />
}<br />
<br />
body {<br />
background-image:url("images/bg.png");<br />
}</code></div></div>
<br />
With no style tags or any tags really. Also, you don't have to style it<br />
like I just did. That's personal preference. I like my stuff to look neat. <br />
As an example of another way you could do it is: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1 {color:white;}<br />
h2 {margin-left:15px;}<br />
body {background-image:url("images/bg.png");}</code></div></div>
<br />
You can have it stacked like that. That's not it either. If you really <br />
wanted to. You could do this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1 {color:white;} h2 {margin-left:15px;} body {background-image:url("images/bg.png");}</code></div></div>
You could have it smashed together. Just. Don't do it on my assignments<br />
please. It's bothers the FUCK out of me. I find it annoying as crap. <br />
<br />
Now then. All External Style Sheets, end in .css and as far as I'm aware<br />
I've never seen it linked in anything but head tags. So, until I test it, when<br />
ever that may be. Always put the rel link in the head tags. <br />
<br />
Internal Style Sheet Invoke Example:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;head&gt;<br />
&lt;style type="text/css"&gt;<br />
h1 {<br />
color:white ;<br />
}<br />
<br />
h2 {<br />
margin-left:15px;<br />
}<br />
<br />
body {<br />
background-image:url("images/bg.png");<br />
}<br />
&lt;/style&gt;<br />
&lt;/head&gt;</code></div></div>
<br />
That's internal styling. And like above, you don't have to do it like I did. <br />
You could do it stacked, or smashed. I just like mine neat. Another thing<br />
about internal styling is that you can do it in the body tags as well. Doesn't<br />
have to be just the head tags. <br />
<br />
The last example is for inline styling. <br />
Inline Styling Invoke Example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;p style="color:white;margin-left:15px"&gt;Test test test test test.&lt;/p&gt;</code></div></div>
<br />
Kind of like the HTML styling. However. I don't suggest this method. It's<br />
long. Tedious and over all just annoying. And I don't see a use for it. <br />
---<br />
<br />
Out of all the styles, I suggest External the most. Unless you're doing literally<br />
just a small small thing. In that case using Internal Styling. <br />
<br />
--<br />
<br />
In CSS there is only ONE way to comment and that is to use the block<br />
comment type. Which is this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>/*<br />
A block comment<br />
*/</code></div></div>
<br />
----<br />
<br />
Another trivia to know is that in CSS. There are literally almost just 2 parts<br />
to it. A selector. And then deceleration(s). An example is this: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;p style="color:white;margin-left:15px"&gt;</code></div></div>
In the above example. The &lt;p&gt; would be the selector. And the <br />
color:white would be the deceleration. In the deceleration. There are 2<br />
parts in the deceleration. That would be the property and then the value. <br />
Color is the property. White is the value. You can technically have as many<br />
decelerations as you like. However I suggest only using a max of maybe <br />
3-4 in one selector. <br />
<br />
If anyone had a hard time understanding that, it's fine. Because really, it<br />
shouldn't matter to you right now anyway. It's really just a bunch of trivia<br />
that's neat to know. So don't worry yourself over it, if none of that made<br />
sense to you.<br />
<br />
---<br />
<br />
Now. What really makes CSS powerful is the ability to style select elements<br />
the way YOU want. There's a neat way to do this too. And that's with <br />
something called "Id" and "Class". You can mention/specify these Id's and<br />
Class's in the HTML code. Like so: <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form class=ClassName action=moo.php&nbsp;&nbsp;method=get&gt;<br />
...<br />
&lt;/form&gt;</code></div></div>
<br />
However, NEVER use a number in an Id or Class. It won't work in some<br />
browsers. Such as FireFox. <br />
----<br />
<br />
How to define a Id or Class in a Style Sheet is like so, <br />
The class uses the HTML class attribute, and is defined with a dot. (".")<br />
All HTML elements with class="center" will be center-aligned In the example<br />
below. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>.center {<br />
text-align:center;<br />
}</code></div></div>
<br />
Here's an example of how it's used practically. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form class="center" method="get" action="action.php"&gt;<br />
...<br />
&lt;/form&gt;</code></div></div>
---<br />
<br />
You can also specify that only specific HTML be affected by a class/id.<br />
all p elements with class="center" will be center-aligned like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p.center {<br />
text-align:center;<br />
}</code></div></div>
<br />
Now you may have noticed. I haven't been putting a space between the<br />
property and the value. That's because you don't have to. But you can if<br />
you want. And most times I do. <br />
---<br />
<br />
Now this may be a bit advanced for something that's only being used to<br />
get your toes wet, but, in CSS another thing that makes it so great is<br />
the ability to group, and nest selectors together. Here's an example: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1, h2, h3 {<br />
color: blue<br />
}</code></div></div>
<br />
Notice that? Anything that's in h1, h2 and h3 will have the color blue now. <br />
So instead of doing separate things for all 3 selectors. We condensed it into<br />
one. You can do this for mismatched selectors too. They don't have to be<br />
the same. An example is :<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>h1, p, b, h3 {<br />
color: blue<br />
}</code></div></div>
<br />
And our last thing for today is something called Nesting. That's right we <br />
can nest selectors. For example, if you wanted to make all &lt;p&gt; blue, but<br />
the specified ones green. You would Nest it. Like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>p {<br />
color:blue;<br />
text-align:center;<br />
}<br />
<br />
.specified {<br />
background-color:blue;<br />
}<br />
<br />
.specified p {<br />
color:white;<br />
}</code></div></div>
<br />
Alright class. That will be the end of this lesson. That was just to get<br />
your toes wet. The next one will be larger. And I may have to double post<br />
Lol. <br />
<br />
So try not to run away. I promise, if you can get past all the boring stuff<br />
first. We'll get to the fun stuff like PHP, Servers, DB's , Security and so on. <br />
But with all good things you have to know the basic stuff first. <br />
<br />
Remember, any comments or suggestions you have are welcomed. Feel free<br />
to invite any of your friends. <br />
<br />
A copy of this class be found here: <br />
<a href="http://thehallowlife.com/webinar/lessons/class4.txt" target="_blank">http://thehallowlife.com/webinar/lessons/class4.txt</a><br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 3: HTML Basics Ending.]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1675</link>
			<pubDate>Thu, 05 Apr 2012 21:08:42 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1675</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
----<br />
<br />
Now this will be the final lesson we have on HTML for now. We will mostly<br />
likely touch up on it a few times later as it does tie into other languages<br />
but in this lesson today, we'll only go over the what I think to be essential <br />
ones, and the other tags which I don't view to be essential, I'll just list and<br />
their definitions in alphabetical order.<br />
<br />
----<br />
<br />
Last time we learned about forms, tables, buttons, input types and so on. <br />
We'll today we're going to learn about attributes such as &lt;iframe&gt; and so on. We'll also cover doctypes, meta information and probably<br />
a few other things. After which I will give you a webpage, which I want <br />
you to complete. <br />
<br />
----<br />
<br />
The first thing we're going to cover is Iframes. Now iframes are kind of <br />
cool when used right. Otherwise they just look ugly and out of context. <br />
But to use an iframe we do this: <br />
<br />
&lt;iframe src="page.html"&gt;&lt;/iframe&gt;<br />
<br />
First we open the tag iframe, and then define the source of where to <br />
pull the information from. In this case I chose page.html, it can be any<br />
thing you'd like though. After which,we then close the iframe with an <br />
iframe end tag. We can also give it more attributes, such as height<br />
width, padding and so on. <br />
<br />
The next thing we will cover is an attribute called "align". We can use this<br />
in basically almost any way. Forms, tables, buttons, text, paragraphs<br />
yup, a lot really. And how we use it is, when we go to make, let's say for<br />
example a paragraph we add this : <br />
<br />
&lt;p align="value"&gt;text &lt;/p&gt;<br />
<br />
We make an open tag, and then add align to it, the values we can give<br />
it is left, right, center and then if you play with it enough, also top and<br />
bottom. <br />
<br />
The next thing we'll get into is Doc types. Now doc types aren't too<br />
hard to understand. For one, you don't technically _need_ them. And<br />
next, one thing you should know is that it goes ABOVE the FIRST &lt;html&gt;<br />
tag. Like so: <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html&gt;<br />
....<br />
&lt;/html&gt;</code></div></div>
<br />
You'll notice the big long line. While my IDE does this automatically for<br />
me, it's something you don't really need to worry about unless you're an<br />
SEO neat freak. But this is the default Doctype and you shouldn't worry<br />
about any others. Just this one. All this really does is help with SEO and<br />
tells your browser the type of document you're loading. And the last bit<br />
tells it, where to pull it's references from and what to match it against. <br />
<br />
Again, not really something you need to worry about. <br />
Another thing to add on to that, is the character type. What I mean<br />
by this is, have you ever seen this in an HTML document?: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /&gt;</code></div></div>
<br />
This is basically a character set type. There are literally a crap load of <br />
them. This is the most basic and default one there is. What this is saying<br />
is, content type is text/html and the charset to read/reference from is<br />
iso-8859-1. <br />
<br />
That's all it really does. That charset is the thing that holds all the<br />
references to the ASCII characters, html entities and so on. Again not <br />
something absolutely essential. Just good for things like SEO, and w3 <br />
compliance. <br />
<br />
The next thing we'll cover is &lt;meta&gt; tags. And boy are these fun. Meta<br />
tags are essentially, the best thing for SEO along with getting Google to<br />
be your new best friend. With meta tags you can redirect, refresh, <br />
describe, author, and so on. There really is a crap load you could do with<br />
meta tags. But for now, we'll only go over the most common ones. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;meta name="description" content="This is what describes content in your page. " /&gt;<br />
&lt;meta name="keywords" content="these, are, keywords, to, help, index, and, seo, your, site. Always, separate, with, a, comma. " /&gt;<br />
&lt;meta name="author" content="Just tells who the author of this page is." /&gt;<br />
&lt;meta http-equiv="refresh" content="number of seconds to refresh" /&gt;<br />
&lt;meta http-equiv="location" content="URL=google.com" /&gt; &lt;!-- upon loading the page they are redirected to the URL above --&gt;</code></div></div>
<br />
And those happen to be the most common ones. There are others, but<br />
we'll leave them for now. And roll right into a practical example to finish<br />
off this lesson. So here's what I want the students to do, make me a page<br />
which at LEAST 10 different types of tags that we've gone over. And <br />
also go to the webpage below and fill out the information. I will be using <br />
only stuff we went over. <br />
<br />
Remember, there is a lot of HTML I did not cover. This is solely because it's<br />
outdated and is useless, or because it ties into another language and I will<br />
cover it then, so it makes more sense. But for now, the HTML lesson set<br />
is over and soon we will start CSS. <br />
<br />
For my students, please go here: <a href="http://thehallowlife.com/webinar/practical.htm" target="_blank">http://thehallowlife.com/webinar/practical.htm</a><br />
<br />
And do the assignment.<br />
--<br />
<br />
Grats for making it to the end of the HTML lesson set. <br />
<br />
It was short, I know. Don't worry. CSS will be longer. And MAYBE a bit<br />
confusing to you, considering how it works and how it ties into HTML. <br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1674" target="_blank">VWBC Lesson 2</a><br />
----<br />
<br />
Now this will be the final lesson we have on HTML for now. We will mostly<br />
likely touch up on it a few times later as it does tie into other languages<br />
but in this lesson today, we'll only go over the what I think to be essential <br />
ones, and the other tags which I don't view to be essential, I'll just list and<br />
their definitions in alphabetical order.<br />
<br />
----<br />
<br />
Last time we learned about forms, tables, buttons, input types and so on. <br />
We'll today we're going to learn about attributes such as &lt;iframe&gt; and so on. We'll also cover doctypes, meta information and probably<br />
a few other things. After which I will give you a webpage, which I want <br />
you to complete. <br />
<br />
----<br />
<br />
The first thing we're going to cover is Iframes. Now iframes are kind of <br />
cool when used right. Otherwise they just look ugly and out of context. <br />
But to use an iframe we do this: <br />
<br />
&lt;iframe src="page.html"&gt;&lt;/iframe&gt;<br />
<br />
First we open the tag iframe, and then define the source of where to <br />
pull the information from. In this case I chose page.html, it can be any<br />
thing you'd like though. After which,we then close the iframe with an <br />
iframe end tag. We can also give it more attributes, such as height<br />
width, padding and so on. <br />
<br />
The next thing we will cover is an attribute called "align". We can use this<br />
in basically almost any way. Forms, tables, buttons, text, paragraphs<br />
yup, a lot really. And how we use it is, when we go to make, let's say for<br />
example a paragraph we add this : <br />
<br />
&lt;p align="value"&gt;text &lt;/p&gt;<br />
<br />
We make an open tag, and then add align to it, the values we can give<br />
it is left, right, center and then if you play with it enough, also top and<br />
bottom. <br />
<br />
The next thing we'll get into is Doc types. Now doc types aren't too<br />
hard to understand. For one, you don't technically _need_ them. And<br />
next, one thing you should know is that it goes ABOVE the FIRST &lt;html&gt;<br />
tag. Like so: <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html&gt;<br />
....<br />
&lt;/html&gt;</code></div></div>
<br />
You'll notice the big long line. While my IDE does this automatically for<br />
me, it's something you don't really need to worry about unless you're an<br />
SEO neat freak. But this is the default Doctype and you shouldn't worry<br />
about any others. Just this one. All this really does is help with SEO and<br />
tells your browser the type of document you're loading. And the last bit<br />
tells it, where to pull it's references from and what to match it against. <br />
<br />
Again, not really something you need to worry about. <br />
Another thing to add on to that, is the character type. What I mean<br />
by this is, have you ever seen this in an HTML document?: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /&gt;</code></div></div>
<br />
This is basically a character set type. There are literally a crap load of <br />
them. This is the most basic and default one there is. What this is saying<br />
is, content type is text/html and the charset to read/reference from is<br />
iso-8859-1. <br />
<br />
That's all it really does. That charset is the thing that holds all the<br />
references to the ASCII characters, html entities and so on. Again not <br />
something absolutely essential. Just good for things like SEO, and w3 <br />
compliance. <br />
<br />
The next thing we'll cover is &lt;meta&gt; tags. And boy are these fun. Meta<br />
tags are essentially, the best thing for SEO along with getting Google to<br />
be your new best friend. With meta tags you can redirect, refresh, <br />
describe, author, and so on. There really is a crap load you could do with<br />
meta tags. But for now, we'll only go over the most common ones. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;meta name="description" content="This is what describes content in your page. " /&gt;<br />
&lt;meta name="keywords" content="these, are, keywords, to, help, index, and, seo, your, site. Always, separate, with, a, comma. " /&gt;<br />
&lt;meta name="author" content="Just tells who the author of this page is." /&gt;<br />
&lt;meta http-equiv="refresh" content="number of seconds to refresh" /&gt;<br />
&lt;meta http-equiv="location" content="URL=google.com" /&gt; &lt;!-- upon loading the page they are redirected to the URL above --&gt;</code></div></div>
<br />
And those happen to be the most common ones. There are others, but<br />
we'll leave them for now. And roll right into a practical example to finish<br />
off this lesson. So here's what I want the students to do, make me a page<br />
which at LEAST 10 different types of tags that we've gone over. And <br />
also go to the webpage below and fill out the information. I will be using <br />
only stuff we went over. <br />
<br />
Remember, there is a lot of HTML I did not cover. This is solely because it's<br />
outdated and is useless, or because it ties into another language and I will<br />
cover it then, so it makes more sense. But for now, the HTML lesson set<br />
is over and soon we will start CSS. <br />
<br />
For my students, please go here: <a href="http://thehallowlife.com/webinar/practical.htm" target="_blank">http://thehallowlife.com/webinar/practical.htm</a><br />
<br />
And do the assignment.<br />
--<br />
<br />
Grats for making it to the end of the HTML lesson set. <br />
<br />
It was short, I know. Don't worry. CSS will be longer. And MAYBE a bit<br />
confusing to you, considering how it works and how it ties into HTML. <br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 2: HTML Basics Continued]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1674</link>
			<pubDate>Thu, 05 Apr 2012 20:50:02 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1674</guid>
			<description><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<br />
<span style="color: #87CEEB;">Now that's taken care of, picking up from where we left off, let's take a look <br />
at a few more things today. Last time we looked at common tags, and basic<br />
tags such as </span><span style="color: #FF6347;">&lt;html&gt; </span><span style="color: #87CEEB;">and </span><span style="color: #FF6347;">&lt;body&gt;</span>. <span style="color: #87CEEB;">We also learned that most tags in this<br />
realm, come in pairs (usually); such as</span> <span style="color: #FF6347;">&lt;b&gt;&lt;/b&gt;</span><span style="color: #87CEEB;"> but that some don't, such<br />
as</span><span style="color: #FF6347;"> &lt;br&gt;</span>. <br />
<br />
So today here is a list of tags we will be going over: <br />
You will note these are ordered and do NOT have the end tags on them. <br />
This is solely because there is already a massive amount of tags to cover<br />
those that ending tags will be noted in the lesson when we learn to use <br />
them. <br />
<span style="color: #FF6347;">&lt;select&gt;</span> == Defines a drop-down list<br />
<span style="color: #FF6347;">&lt;small&gt;</span> == Defines small text<br />
<span style="color: #FF6347;">&lt;span&gt;</span> == Defines a section in a document<br />
<span style="color: #FF6347;">&lt;strike&gt;</span> ==  Defines strike through text<br />
<span style="color: #FF6347;">&lt;strong&gt; </span>== Defines strong text<br />
<span style="color: #FF6347;">&lt;style&gt;</span> == Defines style information for a document<br />
<span style="color: #FF6347;">&lt;sub&gt;</span> == Defines sub script text<br />
<span style="color: #FF6347;">&lt;sup&gt;</span> == Defines super script text <br />
<span style="color: #FF6347;">&lt;table&gt; </span>== Defines a table<br />
<span style="color: #FF6347;">&lt;tbody&gt;</span> == Groups the body content in a table <br />
<span style="color: #FF6347;">&lt;td&gt;</span> == Defines a cell in a table<br />
<span style="color: #FF6347;">&lt;textarea&gt;</span> == Defines a multi-line text input control <br />
<span style="color: #FF6347;">&lt;tfoot&gt;</span> == Groups the footer content in a table<br />
<span style="color: #FF6347;">&lt;th&gt;</span> == Defines a header cell in a table<br />
<span style="color: #FF6347;">&lt;thead&gt;</span> == Groups the header content in a table <br />
<span style="color: #FF6347;">&lt;tr&gt;</span> == Defines a row in a table <br />
<span style="color: #FF6347;">&lt;tt&gt;</span> == Defines teletype text<br />
<span style="color: #FF6347;">&lt;ul&gt;</span> == Defines an unordered list <br />
---<br />
<br />
Now that we have that list out of the way, let's see how to use<br />
some of these. The first thing we will look at for today is, the <br />
last few miscellaneous tags, such as:<span style="color: #FF6347;">&lt;ul&gt;&lt;tt&gt;&lt;sub&gt;&lt;sup&gt;&lt;strike&gt;</span><br />
and<span style="color: #FF6347;"> &lt;small&gt;. </span><br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;ul&gt;&lt;/ul&gt;</code></div></div>
Makes things into an ordered list. Though<br />
it says unordered, I've personally never seen it un ordered. Let's a take a look at what it does in a practical eniroment. Using the example from <br />
yesterday, let's make a new webpage.<br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;html&gt;<br />
&lt;title&gt;Wepage 2&lt;/title&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;This is a heading. Remember, we can have up to 6 of these. &lt;br&gt;<br />
(Although I've gone up to 8. w3 states we can only have 6). &lt;/h1&gt;<br />
&lt;br&gt;<br />
&lt;p&gt;<br />
&lt;ul&gt;* Moo1&lt;/ul&gt;<br />
&lt;ul&gt;* Moo2&lt;/ul&gt;<br />
&lt;ul&gt;* Moo3&lt;/ul&gt;<br />
&lt;ul&gt;* Moo4&lt;/ul&gt;<br />
&lt;/p&gt;<br />
<br />
&lt;p&gt;&lt;sub&gt;This is how we make an&lt;/sub&gt;&lt;sup&gt; ordered list. Each UL element is a listed&lt;/sup&gt;&lt;tt&gt; attribute on the page.&lt;/tt&gt; &lt;br /&gt;<br />
&lt;strike&gt;Meaning, Each time you want&lt;/strike&gt;&lt;small&gt; to list something, each "ordered item"&lt;/small&gt; needs a UL infront. and behind it.&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></div></div>
<br />
As you notice, each time you want an ordered point, you need to <br />
append UL infront and behind it. But if you copied the code strait from<br />
me, it should look like this: <br />
<br />
<img src="http://thehallowlife.com/webinar/examples/webpage2.png" border="0" alt="[Image: webpage2.png]" /><br />
<br />
You'll also notice the little differences in there in the last paragraph. <br />
Those tags were in order of:<span style="color: #FF6347;"> &lt;sub&gt;&lt;/sub&gt;&lt;sup&gt;&lt;/sup&gt;&lt;tt&gt;&lt;/tt&gt;<br />
&lt;strike&gt;&lt;/strike&gt;&lt;small&gt;&lt;/small&gt;</span><br />
---<br />
A quick thing we should learn about HTML is how to use comments. <br />
A lot of who know a different language will know that in most cases, <br />
<span style="color: #FF6347;">// /**/ </span>and<span style="color: #FF6347;"> #</span> will work as comments. But not in HTML. HTML comments work<br />
like this: <span style="color: #FF6347;">&lt;!-- </span>text here <span style="color: #FF6347;">--&gt; </span>Vastly different from those up above. <br />
<br />
So to review, to make an HTML comment, it's like this: <br />
<span style="color: #FF6347;">&lt;!-- </span>(this starts the comment) <br />
<span style="color: #FF6347;">--&gt; </span>(this ends the comment)<br />
<br />
---<br />
Moving along, we'll be getting into things called Tables (and their attributes)<br />
and things called HTML Elements/Attributes. <br />
<br />
Tables, are an easy concept once you get the hang of it. Every table<br />
start with <span style="color: #FF6347;">&lt;table&gt; </span>and ends with <span style="color: #FF6347;">&lt;/table&gt;. </span><br />
To make a "column" in a table, you use "<span style="color: #FF6347;">&lt;tr&gt;</span>", and to make a row you use<br />
"<span style="color: #FF6347;">&lt;td&gt;</span>" both of which end with their corresponding end tags (e.g.: <span style="color: #FF6347;">&lt;/td&gt;</span> and <span style="color: #FF6347;">&lt;/tr&gt;</span>)<br />
<br />
Now, let's see how to actually use them. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;table&gt; &lt;!-- we're beginning a table --&gt;<br />
&lt;tr&gt; &lt;!-- Making a column --&gt;<br />
&lt;td&gt;&lt;/td&gt; &lt;!-- making a cell/row --&gt;<br />
&lt;td&gt;&lt;/td&gt; &lt;!-- making a cell/row --&gt;<br />
&lt;/tr&gt; &lt;!-- ending the column --&gt;<br />
&lt;tr&gt; &lt;!--making a new column --&gt; <br />
&lt;td&gt;&lt;/td&gt; &lt;!-- making a cell/row --&gt;<br />
&lt;td&gt;&lt;/td&gt; &lt;!-- making a cell/row --&gt;<br />
&lt;/tr&gt; &lt;!--ending the column --&gt;<br />
&lt;/table&gt; &lt;!-- ending the table --&gt;</code></div></div>
<br />
Now if you run this code in say a browser as a .html, nothing will<br />
happen/show up. This is because there isn't any information in it. <br />
However if add, let's say.. 11 in between each: &lt;td&gt;&lt;/td&gt; <br />
then when you run it, you will get a neat organized table, of a 2x2<br />
formation. Go ahead and try it, if you did, it should look like this: <br />
<br />
<img src="http://thehallowlife.com/webinar/examples/table1.png" border="0" alt="[Image: table1.png]" /><br />
<br />
--<br />
<br />
Another thing to mention about tables, is the thead, tbody, and tfoot. <br />
Unless you're using Java Script, in serious combination, the amount you will<br />
ever use these tags is about nil. So I'm not going to bother explaining them.<br />
However w3 schools, does explain them I believe. <br />
--<br />
<br />
But now that we've learned a little about tables, another important<br />
thing to mention is forms. Everyone uses forms in some way. So let's see<br />
how we're gonna use them. <br />
<br />
First, to create a form we need form tags. <span style="color: #FF6347;">&lt;form&gt;&lt;/form&gt;</span><br />
But, making a form tag alone won't work. Otherwise any information we <br />
give it, can't/won't be executed nor will it do anything. For there's nothing<br />
to parse it or relay or anything. So what do we do? We give it an action. <br />
<br />
And to do that, we use an attribute called "action", which would be used <br />
like this: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form action="myAction.php"&gt;<br />
&lt;/form&gt;</code></div></div>
<br />
Now as you can see, "action=" is how we tell the browser we're submitting<br />
information using this action. And "myAction.php" is the action script<br />
we're using. Now it doesn't have to be .php it could be anything, like<br />
action.php, action.asp, action.aspx. So long as it can parse the information.So remember, any file name, any extension. <br />
<br />
But that alone isn't enough we have to tell it, what type of action, using<br />
one of two method. POST and GET. Which are used like so. <br />
POST will get user inputted data such as, a message in a text box<br />
most commonly used for contact forms. Where as GET will just get the<br />
url/header info. <br />
<br />
For this example, we'll just use the GET method. So we apply it like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form action="action.php" method="get"&gt;<br />
&lt;/form&gt;</code></div></div>
This is all need for the form, however there are other things<br />
we can do, such as giving it an encryption method as well. If we <br />
don't put one in, the default one is text/plain. So we'll use that one. <br />
Which is done like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form action="action.php" method="get" enctype="text/plain"&gt;<br />
&lt;/form&gt;</code></div></div>
Now that we have a form, we should give it some actual content. <br />
Let's go ahead and go over the next set of tags we'll be using. <br />
Preview this example here which uses all the tags we'll be going over. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form action="234" method="get" enctype="text/plain"&gt;<br />
&lt;input type="text" value="1" /&gt;<br />
&lt;textarea wrap="OFF"&gt;<br />
&lt;/textarea&gt;<br />
&lt;input type="password" value="1"/&gt;<br />
&lt;input type="file" accept=".rar" size="20" /&gt;<br />
&lt;input type="submit" value="submit" src="moo.com/moo" /&gt;<br />
&lt;input type="button" /&gt;<br />
&lt;input type="reset" value="9" /&gt;<br />
&lt;input type="image" src="moo.jpg" /&gt;<br />
&lt;input type="radio" value="k" /&gt;<br />
&lt;input type="checkbox" value="k" /&gt;<br />
&lt;select size="1"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value="k"&gt;k&lt;/option&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value="l"&gt;l&lt;/option&gt;<br />
&lt;/select&gt;<br />
&lt;input type="hidden" value="," /&gt;<br />
&lt;/form&gt;</code></div></div>
<br />
You'll notice there is a lot of input types, this is because in a form we<br />
need content, and what better way for content than input from the user<br />
which is what form are most commonly used for. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="text" value="1" /&gt;</code></div></div>
The above piece of code is called a "text box" type input. This lets input<br />
a line of text into a text box. You'll notice where it says "value="1"", that<br />
is the default value I gave it. All input types will start this way: <br />
<span style="color: #FF6347;">&lt;input type=""&gt;</span> there are quite a few different input types you can do. <br />
Now, the above code isn't all we can do to it. We can give it style, <br />
padding, width, height and so on, but that's for a later discussion. <br />
This type of input box is commonly used for username input. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;textarea wrap="OFF"&gt; &lt;/textarea&gt;</code></div></div>
The text area tags, allow for multiple line entries, commonly used for a <br />
"comment" box or other, where it would normally take more than one line. <br />
You'll notice is has ending tags, whereas the input types, do not. <br />
Where it says wrap=off, this means when a person is typing, instead of<br />
the line going to a new line when it hits the edge, it'll instead keep going.<br />
To fix that, just put wrap="on".<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="password" value="1"/&gt;</code></div></div>
The above is a password type input box. Commonly used for password<br />
input boxes, like above it's usually used in conjuncture with the username<br />
box. <br />
<br />
Most input types, are the same, either buttons or boxes which can be <br />
further styled with width, height, padding and so on. But again, that's <br />
for a later session. Moving along to the next one: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="file" accept=".rar" size="20" /&gt;</code></div></div>
This input type is for when you upload stuff. Ever wonder why <br />
those upload forms look the way they look? or why they only<br />
accept certain types of files? Well this one accepts .rar only, but<br />
if you were to want it to accept something else, just replace the .rar<br />
with the extension, e.g.: .zip or .jpg. Or if you want it to have multiple<br />
extensions, just do this: accept=".zip, .rar, .png, .ext"&gt;<br />
<br />
You'll notice all I did was add a comma and a space. That's all that is <br />
needed. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="submit" value="submit" src="moo.com/moo" /&gt;</code></div></div>
One of the most common types here, is the submit button. <br />
The "value" is the name of the button. The src="" is only<br />
if you want to send them to that URL when they hit submit. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="button" /&gt;</code></div></div>
This just makes a button. You can do pretty much anything to this button.<br />
It doesn't anything right now though. Though this type is sometimes used<br />
on online test. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="reset" value="9" /&gt;</code></div></div>
This is a "reset" button. What it does is, reset all user input that's been<br />
made back to it's default values. The "value" is the name of the reset <br />
button. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="image" src="moo.jpg" /&gt;</code></div></div>
This input type is an image. Not a button or anything but can be clicked, also commonly used<br />
for html GUI's. After telling the browser this input is a image, give it a link<br />
using the src="" method. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="radio" value="k" /&gt;</code></div></div>
This is a radio button. Common used for a"yes no" type questions on most<br />
online sites. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="checkbox" value="k" /&gt;</code></div></div>
Is a check box type, commonly used for sites when asking for stuff like<br />
"what's your favorite hobbies? pick 5" type things. <br />
<br />
And lastly, for the form contents is ;<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;select size="1"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value="k"&gt;k&lt;/option&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value="l"&gt;l&lt;/option&gt;<br />
&lt;/select&gt;</code></div></div>
<br />
This is a select box. Or otherwise known as a drop down box. To make it<br />
work, we make a select size, using <span style="color: #FF6347;">&lt;select size=""&gt; </span>most times the size is dependent on the type of select box. For words try size 7, for numbers or letters, try 1.  After which we need to give it some options. To do so, we tell it to do so by using the <span style="color: #FF6347;">&lt;option&gt;&lt;/option&gt;</span> tags. Make an option value, this should be the same as the actual value itself. i.e.: if you were to have a drop down of milk, eggs, and water. Then makes the values, and names the same. However, if you were to have, say the options, male or female, then make the values, sex, but the names male/female. <br />
And after you're done making some options, end the select tag with<br />
<span style="color: #FF6347;">&lt;/select&gt;</span><br />
<br />
You're probably wondering what the hidden value thing is. Well a lot of <br />
times, people will have hidden values in their forms. However, I have yet<br />
to find a use for it. So I won't be going over it. <br />
--<br />
<br />
That concludes forms for now. Moving along to links. <br />
<br />
There a re a couple types of links. There's image links, hyper links, <br />
and then in the hyper links, there are url, self, blank, top, and nothing. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;a href="url"&gt; link name &lt;/a&gt;</code></div></div>
Is how you would "anchor" a link. the &lt;a&gt; is an anchor. Now there <br />
are a few things we can do, besides, just putting a URL. We can do<br />
this too: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;a href="url" target="_blank"&gt; link name &lt;/a&gt;</code></div></div>
You'll notice I added something new. This is called the "target method". <br />
Meaning, when someone clicks the link, the target is then followed. <br />
_blank will open a new window. _self will reload the current page to the<br />
new link. (e.g.: click here for next page, types). _parent and _top will full screen the page. <br />
<br />
And lastly for link types is <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;img src="url&gt;&lt;/img&gt;</code></div></div>
<br />
To make an image show up, you would put the image url in the <br />
quotes, and then close off the image with it's end tag. Now a lot of times<br />
people will tell you, you don't need an end tag. Well it never works for me<br />
so I'm telling you, you do. You can do other things with an image tag, <br />
but for now, for this lesson we'll leave it like that. So, let's use these tags<br />
we just learned about in an practical example. <br />
<br />
After using all the tags in a practical example, I give you this: <br />
<img src="http://thehallowlife.com/webinar/examples/webpageexample.png" border="0" alt="[Image: webpageexample.png]" /><br />
<br />
<span style="color: limegreen;">Now my assignment to the students is to try using all these tags in a<br />
practical example. Of course my source and examples are always free <br />
to look at for a reminder of how to do something. </span><br />
<br />
Sorry it took so long to get out. Thanks for viewing this class. <br />
Be sure to wait for the next one. Which will go over the rest of the<br />
HTML tags including attributes and elements, such as align, name, class<br />
and so on. <br />
<br />
<br />
NOTE: I am sorry about the lack of color. <br />
<br />
Side note: <br />
<br />
You can view the examples here: <br />
http;//thehallowlife.com/webinar/examples/webpage2.png<br />
<a href="http://thehallowlife.com/webinar/examples/table1.png" target="_blank">http://thehallowlife.com/webinar/examples/table1.png</a><br />
<a href="http://thehallowlife.com/webinar/examples/webpageexample.png" target="_blank">http://thehallowlife.com/webinar/example...xample.png</a><br />
<br />
You can view the example webpage here: <br />
<a href="http://thehallowlife.com/webinar/examples/webpage2.html" target="_blank">http://thehallowlife.com/webinar/examples/webpage2.html</a><br />
<br />
You can view the lesson here: <br />
<a href="http://thehallowlife.com/webinar/lessons/class2.txt" target="_blank">http://thehallowlife.com/webinar/lessons/class2.txt</a><br />
<br />
You can view the sources here: <br />
<a href="http://thehallowlife.com/webinar/source/lesson2.1.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson2.1.txt</a><br />
<a href="http://thehallowlife.com/webinar/source/lesson2.2.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson2.2.txt</a><br />
<a href="http://thehallowlife.com/webinar/source/lesson2.3.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson2.3.txt</a><br />
<br />
This was the final practical example webpage, if you'd like<br />
that source too.<br />
<a href="http://thehallowlife.com/webinar/source/lesson2.4.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson2.4.txt</a><br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Viral's Web Basics Class. <br />
<br />
Thank you for viewing this class once again. If you're just<br />
now joining us, then I suggest reading these threads first: <br />
<br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">Viral's Web Basics Class (Home Desk)</a><br />
<a href="http://thehallowlife.com/forums/showthread.php?tid=1673" target="_blank">VWBC Lesson 1</a><br />
<br />
<span style="color: #87CEEB;">Now that's taken care of, picking up from where we left off, let's take a look <br />
at a few more things today. Last time we looked at common tags, and basic<br />
tags such as </span><span style="color: #FF6347;">&lt;html&gt; </span><span style="color: #87CEEB;">and </span><span style="color: #FF6347;">&lt;body&gt;</span>. <span style="color: #87CEEB;">We also learned that most tags in this<br />
realm, come in pairs (usually); such as</span> <span style="color: #FF6347;">&lt;b&gt;&lt;/b&gt;</span><span style="color: #87CEEB;"> but that some don't, such<br />
as</span><span style="color: #FF6347;"> &lt;br&gt;</span>. <br />
<br />
So today here is a list of tags we will be going over: <br />
You will note these are ordered and do NOT have the end tags on them. <br />
This is solely because there is already a massive amount of tags to cover<br />
those that ending tags will be noted in the lesson when we learn to use <br />
them. <br />
<span style="color: #FF6347;">&lt;select&gt;</span> == Defines a drop-down list<br />
<span style="color: #FF6347;">&lt;small&gt;</span> == Defines small text<br />
<span style="color: #FF6347;">&lt;span&gt;</span> == Defines a section in a document<br />
<span style="color: #FF6347;">&lt;strike&gt;</span> ==  Defines strike through text<br />
<span style="color: #FF6347;">&lt;strong&gt; </span>== Defines strong text<br />
<span style="color: #FF6347;">&lt;style&gt;</span> == Defines style information for a document<br />
<span style="color: #FF6347;">&lt;sub&gt;</span> == Defines sub script text<br />
<span style="color: #FF6347;">&lt;sup&gt;</span> == Defines super script text <br />
<span style="color: #FF6347;">&lt;table&gt; </span>== Defines a table<br />
<span style="color: #FF6347;">&lt;tbody&gt;</span> == Groups the body content in a table <br />
<span style="color: #FF6347;">&lt;td&gt;</span> == Defines a cell in a table<br />
<span style="color: #FF6347;">&lt;textarea&gt;</span> == Defines a multi-line text input control <br />
<span style="color: #FF6347;">&lt;tfoot&gt;</span> == Groups the footer content in a table<br />
<span style="color: #FF6347;">&lt;th&gt;</span> == Defines a header cell in a table<br />
<span style="color: #FF6347;">&lt;thead&gt;</span> == Groups the header content in a table <br />
<span style="color: #FF6347;">&lt;tr&gt;</span> == Defines a row in a table <br />
<span style="color: #FF6347;">&lt;tt&gt;</span> == Defines teletype text<br />
<span style="color: #FF6347;">&lt;ul&gt;</span> == Defines an unordered list <br />
---<br />
<br />
Now that we have that list out of the way, let's see how to use<br />
some of these. The first thing we will look at for today is, the <br />
last few miscellaneous tags, such as:<span style="color: #FF6347;">&lt;ul&gt;&lt;tt&gt;&lt;sub&gt;&lt;sup&gt;&lt;strike&gt;</span><br />
and<span style="color: #FF6347;"> &lt;small&gt;. </span><br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;ul&gt;&lt;/ul&gt;</code></div></div>
Makes things into an ordered list. Though<br />
it says unordered, I've personally never seen it un ordered. Let's a take a look at what it does in a practical eniroment. Using the example from <br />
yesterday, let's make a new webpage.<br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;html&gt;<br />
&lt;title&gt;Wepage 2&lt;/title&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;This is a heading. Remember, we can have up to 6 of these. &lt;br&gt;<br />
(Although I've gone up to 8. w3 states we can only have 6). &lt;/h1&gt;<br />
&lt;br&gt;<br />
&lt;p&gt;<br />
&lt;ul&gt;* Moo1&lt;/ul&gt;<br />
&lt;ul&gt;* Moo2&lt;/ul&gt;<br />
&lt;ul&gt;* Moo3&lt;/ul&gt;<br />
&lt;ul&gt;* Moo4&lt;/ul&gt;<br />
&lt;/p&gt;<br />
<br />
&lt;p&gt;&lt;sub&gt;This is how we make an&lt;/sub&gt;&lt;sup&gt; ordered list. Each UL element is a listed&lt;/sup&gt;&lt;tt&gt; attribute on the page.&lt;/tt&gt; &lt;br /&gt;<br />
&lt;strike&gt;Meaning, Each time you want&lt;/strike&gt;&lt;small&gt; to list something, each "ordered item"&lt;/small&gt; needs a UL infront. and behind it.&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></div></div>
<br />
As you notice, each time you want an ordered point, you need to <br />
append UL infront and behind it. But if you copied the code strait from<br />
me, it should look like this: <br />
<br />
<img src="http://thehallowlife.com/webinar/examples/webpage2.png" border="0" alt="[Image: webpage2.png]" /><br />
<br />
You'll also notice the little differences in there in the last paragraph. <br />
Those tags were in order of:<span style="color: #FF6347;"> &lt;sub&gt;&lt;/sub&gt;&lt;sup&gt;&lt;/sup&gt;&lt;tt&gt;&lt;/tt&gt;<br />
&lt;strike&gt;&lt;/strike&gt;&lt;small&gt;&lt;/small&gt;</span><br />
---<br />
A quick thing we should learn about HTML is how to use comments. <br />
A lot of who know a different language will know that in most cases, <br />
<span style="color: #FF6347;">// /**/ </span>and<span style="color: #FF6347;"> #</span> will work as comments. But not in HTML. HTML comments work<br />
like this: <span style="color: #FF6347;">&lt;!-- </span>text here <span style="color: #FF6347;">--&gt; </span>Vastly different from those up above. <br />
<br />
So to review, to make an HTML comment, it's like this: <br />
<span style="color: #FF6347;">&lt;!-- </span>(this starts the comment) <br />
<span style="color: #FF6347;">--&gt; </span>(this ends the comment)<br />
<br />
---<br />
Moving along, we'll be getting into things called Tables (and their attributes)<br />
and things called HTML Elements/Attributes. <br />
<br />
Tables, are an easy concept once you get the hang of it. Every table<br />
start with <span style="color: #FF6347;">&lt;table&gt; </span>and ends with <span style="color: #FF6347;">&lt;/table&gt;. </span><br />
To make a "column" in a table, you use "<span style="color: #FF6347;">&lt;tr&gt;</span>", and to make a row you use<br />
"<span style="color: #FF6347;">&lt;td&gt;</span>" both of which end with their corresponding end tags (e.g.: <span style="color: #FF6347;">&lt;/td&gt;</span> and <span style="color: #FF6347;">&lt;/tr&gt;</span>)<br />
<br />
Now, let's see how to actually use them. <br />
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;table&gt; &lt;!-- we're beginning a table --&gt;<br />
&lt;tr&gt; &lt;!-- Making a column --&gt;<br />
&lt;td&gt;&lt;/td&gt; &lt;!-- making a cell/row --&gt;<br />
&lt;td&gt;&lt;/td&gt; &lt;!-- making a cell/row --&gt;<br />
&lt;/tr&gt; &lt;!-- ending the column --&gt;<br />
&lt;tr&gt; &lt;!--making a new column --&gt; <br />
&lt;td&gt;&lt;/td&gt; &lt;!-- making a cell/row --&gt;<br />
&lt;td&gt;&lt;/td&gt; &lt;!-- making a cell/row --&gt;<br />
&lt;/tr&gt; &lt;!--ending the column --&gt;<br />
&lt;/table&gt; &lt;!-- ending the table --&gt;</code></div></div>
<br />
Now if you run this code in say a browser as a .html, nothing will<br />
happen/show up. This is because there isn't any information in it. <br />
However if add, let's say.. 11 in between each: &lt;td&gt;&lt;/td&gt; <br />
then when you run it, you will get a neat organized table, of a 2x2<br />
formation. Go ahead and try it, if you did, it should look like this: <br />
<br />
<img src="http://thehallowlife.com/webinar/examples/table1.png" border="0" alt="[Image: table1.png]" /><br />
<br />
--<br />
<br />
Another thing to mention about tables, is the thead, tbody, and tfoot. <br />
Unless you're using Java Script, in serious combination, the amount you will<br />
ever use these tags is about nil. So I'm not going to bother explaining them.<br />
However w3 schools, does explain them I believe. <br />
--<br />
<br />
But now that we've learned a little about tables, another important<br />
thing to mention is forms. Everyone uses forms in some way. So let's see<br />
how we're gonna use them. <br />
<br />
First, to create a form we need form tags. <span style="color: #FF6347;">&lt;form&gt;&lt;/form&gt;</span><br />
But, making a form tag alone won't work. Otherwise any information we <br />
give it, can't/won't be executed nor will it do anything. For there's nothing<br />
to parse it or relay or anything. So what do we do? We give it an action. <br />
<br />
And to do that, we use an attribute called "action", which would be used <br />
like this: <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form action="myAction.php"&gt;<br />
&lt;/form&gt;</code></div></div>
<br />
Now as you can see, "action=" is how we tell the browser we're submitting<br />
information using this action. And "myAction.php" is the action script<br />
we're using. Now it doesn't have to be .php it could be anything, like<br />
action.php, action.asp, action.aspx. So long as it can parse the information.So remember, any file name, any extension. <br />
<br />
But that alone isn't enough we have to tell it, what type of action, using<br />
one of two method. POST and GET. Which are used like so. <br />
POST will get user inputted data such as, a message in a text box<br />
most commonly used for contact forms. Where as GET will just get the<br />
url/header info. <br />
<br />
For this example, we'll just use the GET method. So we apply it like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form action="action.php" method="get"&gt;<br />
&lt;/form&gt;</code></div></div>
This is all need for the form, however there are other things<br />
we can do, such as giving it an encryption method as well. If we <br />
don't put one in, the default one is text/plain. So we'll use that one. <br />
Which is done like so: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form action="action.php" method="get" enctype="text/plain"&gt;<br />
&lt;/form&gt;</code></div></div>
Now that we have a form, we should give it some actual content. <br />
Let's go ahead and go over the next set of tags we'll be using. <br />
Preview this example here which uses all the tags we'll be going over. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;form action="234" method="get" enctype="text/plain"&gt;<br />
&lt;input type="text" value="1" /&gt;<br />
&lt;textarea wrap="OFF"&gt;<br />
&lt;/textarea&gt;<br />
&lt;input type="password" value="1"/&gt;<br />
&lt;input type="file" accept=".rar" size="20" /&gt;<br />
&lt;input type="submit" value="submit" src="moo.com/moo" /&gt;<br />
&lt;input type="button" /&gt;<br />
&lt;input type="reset" value="9" /&gt;<br />
&lt;input type="image" src="moo.jpg" /&gt;<br />
&lt;input type="radio" value="k" /&gt;<br />
&lt;input type="checkbox" value="k" /&gt;<br />
&lt;select size="1"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value="k"&gt;k&lt;/option&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value="l"&gt;l&lt;/option&gt;<br />
&lt;/select&gt;<br />
&lt;input type="hidden" value="," /&gt;<br />
&lt;/form&gt;</code></div></div>
<br />
You'll notice there is a lot of input types, this is because in a form we<br />
need content, and what better way for content than input from the user<br />
which is what form are most commonly used for. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="text" value="1" /&gt;</code></div></div>
The above piece of code is called a "text box" type input. This lets input<br />
a line of text into a text box. You'll notice where it says "value="1"", that<br />
is the default value I gave it. All input types will start this way: <br />
<span style="color: #FF6347;">&lt;input type=""&gt;</span> there are quite a few different input types you can do. <br />
Now, the above code isn't all we can do to it. We can give it style, <br />
padding, width, height and so on, but that's for a later discussion. <br />
This type of input box is commonly used for username input. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;textarea wrap="OFF"&gt; &lt;/textarea&gt;</code></div></div>
The text area tags, allow for multiple line entries, commonly used for a <br />
"comment" box or other, where it would normally take more than one line. <br />
You'll notice is has ending tags, whereas the input types, do not. <br />
Where it says wrap=off, this means when a person is typing, instead of<br />
the line going to a new line when it hits the edge, it'll instead keep going.<br />
To fix that, just put wrap="on".<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="password" value="1"/&gt;</code></div></div>
The above is a password type input box. Commonly used for password<br />
input boxes, like above it's usually used in conjuncture with the username<br />
box. <br />
<br />
Most input types, are the same, either buttons or boxes which can be <br />
further styled with width, height, padding and so on. But again, that's <br />
for a later session. Moving along to the next one: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="file" accept=".rar" size="20" /&gt;</code></div></div>
This input type is for when you upload stuff. Ever wonder why <br />
those upload forms look the way they look? or why they only<br />
accept certain types of files? Well this one accepts .rar only, but<br />
if you were to want it to accept something else, just replace the .rar<br />
with the extension, e.g.: .zip or .jpg. Or if you want it to have multiple<br />
extensions, just do this: accept=".zip, .rar, .png, .ext"&gt;<br />
<br />
You'll notice all I did was add a comma and a space. That's all that is <br />
needed. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="submit" value="submit" src="moo.com/moo" /&gt;</code></div></div>
One of the most common types here, is the submit button. <br />
The "value" is the name of the button. The src="" is only<br />
if you want to send them to that URL when they hit submit. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="button" /&gt;</code></div></div>
This just makes a button. You can do pretty much anything to this button.<br />
It doesn't anything right now though. Though this type is sometimes used<br />
on online test. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="reset" value="9" /&gt;</code></div></div>
This is a "reset" button. What it does is, reset all user input that's been<br />
made back to it's default values. The "value" is the name of the reset <br />
button. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="image" src="moo.jpg" /&gt;</code></div></div>
This input type is an image. Not a button or anything but can be clicked, also commonly used<br />
for html GUI's. After telling the browser this input is a image, give it a link<br />
using the src="" method. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="radio" value="k" /&gt;</code></div></div>
This is a radio button. Common used for a"yes no" type questions on most<br />
online sites. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;input type="checkbox" value="k" /&gt;</code></div></div>
Is a check box type, commonly used for sites when asking for stuff like<br />
"what's your favorite hobbies? pick 5" type things. <br />
<br />
And lastly, for the form contents is ;<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;select size="1"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value="k"&gt;k&lt;/option&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value="l"&gt;l&lt;/option&gt;<br />
&lt;/select&gt;</code></div></div>
<br />
This is a select box. Or otherwise known as a drop down box. To make it<br />
work, we make a select size, using <span style="color: #FF6347;">&lt;select size=""&gt; </span>most times the size is dependent on the type of select box. For words try size 7, for numbers or letters, try 1.  After which we need to give it some options. To do so, we tell it to do so by using the <span style="color: #FF6347;">&lt;option&gt;&lt;/option&gt;</span> tags. Make an option value, this should be the same as the actual value itself. i.e.: if you were to have a drop down of milk, eggs, and water. Then makes the values, and names the same. However, if you were to have, say the options, male or female, then make the values, sex, but the names male/female. <br />
And after you're done making some options, end the select tag with<br />
<span style="color: #FF6347;">&lt;/select&gt;</span><br />
<br />
You're probably wondering what the hidden value thing is. Well a lot of <br />
times, people will have hidden values in their forms. However, I have yet<br />
to find a use for it. So I won't be going over it. <br />
--<br />
<br />
That concludes forms for now. Moving along to links. <br />
<br />
There a re a couple types of links. There's image links, hyper links, <br />
and then in the hyper links, there are url, self, blank, top, and nothing. <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;a href="url"&gt; link name &lt;/a&gt;</code></div></div>
Is how you would "anchor" a link. the &lt;a&gt; is an anchor. Now there <br />
are a few things we can do, besides, just putting a URL. We can do<br />
this too: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;a href="url" target="_blank"&gt; link name &lt;/a&gt;</code></div></div>
You'll notice I added something new. This is called the "target method". <br />
Meaning, when someone clicks the link, the target is then followed. <br />
_blank will open a new window. _self will reload the current page to the<br />
new link. (e.g.: click here for next page, types). _parent and _top will full screen the page. <br />
<br />
And lastly for link types is <div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;img src="url&gt;&lt;/img&gt;</code></div></div>
<br />
To make an image show up, you would put the image url in the <br />
quotes, and then close off the image with it's end tag. Now a lot of times<br />
people will tell you, you don't need an end tag. Well it never works for me<br />
so I'm telling you, you do. You can do other things with an image tag, <br />
but for now, for this lesson we'll leave it like that. So, let's use these tags<br />
we just learned about in an practical example. <br />
<br />
After using all the tags in a practical example, I give you this: <br />
<img src="http://thehallowlife.com/webinar/examples/webpageexample.png" border="0" alt="[Image: webpageexample.png]" /><br />
<br />
<span style="color: limegreen;">Now my assignment to the students is to try using all these tags in a<br />
practical example. Of course my source and examples are always free <br />
to look at for a reminder of how to do something. </span><br />
<br />
Sorry it took so long to get out. Thanks for viewing this class. <br />
Be sure to wait for the next one. Which will go over the rest of the<br />
HTML tags including attributes and elements, such as align, name, class<br />
and so on. <br />
<br />
<br />
NOTE: I am sorry about the lack of color. <br />
<br />
Side note: <br />
<br />
You can view the examples here: <br />
http;//thehallowlife.com/webinar/examples/webpage2.png<br />
<a href="http://thehallowlife.com/webinar/examples/table1.png" target="_blank">http://thehallowlife.com/webinar/examples/table1.png</a><br />
<a href="http://thehallowlife.com/webinar/examples/webpageexample.png" target="_blank">http://thehallowlife.com/webinar/example...xample.png</a><br />
<br />
You can view the example webpage here: <br />
<a href="http://thehallowlife.com/webinar/examples/webpage2.html" target="_blank">http://thehallowlife.com/webinar/examples/webpage2.html</a><br />
<br />
You can view the lesson here: <br />
<a href="http://thehallowlife.com/webinar/lessons/class2.txt" target="_blank">http://thehallowlife.com/webinar/lessons/class2.txt</a><br />
<br />
You can view the sources here: <br />
<a href="http://thehallowlife.com/webinar/source/lesson2.1.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson2.1.txt</a><br />
<a href="http://thehallowlife.com/webinar/source/lesson2.2.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson2.2.txt</a><br />
<a href="http://thehallowlife.com/webinar/source/lesson2.3.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson2.3.txt</a><br />
<br />
This was the final practical example webpage, if you'd like<br />
that source too.<br />
<a href="http://thehallowlife.com/webinar/source/lesson2.4.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson2.4.txt</a><br />
<br />
-Viral.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VWBC - Lesson 1: HTML Basics]]></title>
			<link>http://thehallowlife.com/forums/showthread.php?tid=1673</link>
			<pubDate>Thu, 05 Apr 2012 20:45:29 -0400</pubDate>
			<guid isPermaLink="false">http://thehallowlife.com/forums/showthread.php?tid=1673</guid>
			<description><![CDATA[Thanks for viewing Viral's Web Basics Class. <br />
This is a series of lessons/tutorial for the class located<br />
here: <a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">http://thehallowlife.com/forums/showthread.php?tid=1672</a><br />
<br />
Lesson 1: HTML Basics. <br />
<br />
--<br />
<br />
<span style="color: #9370DB;">First things first, to learn HTML you have to know what it is. <br />
A lot of people think HTML is a programming or scripting language; <br />
this is incorrect. HTML is a Markup language. <br />
<br />
HTML stands for: Hyper Text Markup Language. <br />
<br />
HTML uses what's called "markup tags", to create web pages. It is<br />
by no means a scripting language. No markup tags, no web page. <br />
Every page you ever see on the internet uses mark up tags in some way. <br />
<br />
When you see a markup tag on a webpage, they usually are called<br />
"HTML tags". Well in conjunction with that, EVERY html tag you see<br />
start with "&lt;" and end with "&gt;". These are called angle brackets. <br />
HTML tags NORMALLY come in pairs, (e.g: &lt;html&gt;&lt;/html&gt;) and<br />
those tags are called "start tags" and "end tags" or aka opening and<br />
closing tags. </span><br />
--<br />
<br />
Moving along, a few things we will be going over in this lesson is how to<br />
get up a basic web page using some of the tags today. <br />
<br />
The first set of tags we will look at is: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;html&gt;&lt;/html&gt;<br />
&lt;title&gt;&lt;/title&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;body&gt;&lt;/body&gt;<br />
&lt;h1&gt;&lt;/h1&gt;<br />
&lt;h2&gt;&lt;/h2&gt;<br />
&lt;p&gt;&lt;/p&gt;<br />
&lt;b&gt;&lt;/b&gt;<br />
&lt;i&gt;&lt;/i&gt;<br />
&lt;u&gt;&lt;/u&gt;<br />
&lt;center&gt;&lt;/center&gt;<br />
&lt;br&gt;</code></div></div>
<span style="color: #87CEEB;"><br />
These are all very basic tags, and are on almost every webpage. <br />
Now, while it's not "ABSOLUTELY" needed to have any tags what so ever, <br />
it does help a great deal. <br />
<br />
Now let's see how we're gonna use them. : </span><br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;html&gt;&nbsp;&nbsp;== Start a webpage, <br />
&lt;/html&gt; == ends a webpage. <br />
&lt;title&gt; == Defines the title of a page. <br />
&lt;/title&gt; == ends the title tag. <br />
&lt;head&gt; == defines the start of the first set of content in a page, <br />
anything in this is loaded first, such as java script. <br />
&lt;/head&gt; == defines the ending of the head tag, goes to the next tag.<br />
&lt;body&gt; == this is the "main page bulk" this is where most of the webpage<br />
content will be. <br />
&lt;/body&gt; == ends the main page bulk. <br />
&lt;h1&gt; == defines the "heading" of the page, this shows up as the "first header"<br />
as per "h1" which means "heading 1". <br />
&lt;/h1&gt; == ends the first header. <br />
&lt;h2&gt; == same as heading one, just that it happens to be header two. <br />
&lt;/h2&gt; == ends the header 2 tags. you can technically have as many <br />
header tags as you like. <br />
&lt;p&gt; == starts a paragraph, this is called the paragraph tag. <br />
&lt;/p&gt; == ends a paragraph tag. <br />
&lt;b&gt; == start tag to making a word(s) bold. <br />
&lt;/b&gt; == end tag to bold. <br />
&lt;i&gt; == start tag to making word(s) italic. <br />
&lt;/i&gt; == end tag to italic. <br />
&lt;u&gt; == start tag to making word(s) underline.<br />
&lt;/u&gt; == end stag to underline. <br />
&lt;center&gt; == start tag to make content in between centered. <br />
&lt;/center&gt; == end tag to center. <br />
&lt;br&gt; a tag without the need of an end tag, it makes a line break. <br />
 meaning it goes to a new line.</code></div></div>
<span style="color: #87CEEB;"><br />
Now that we know what each one is, and what they do, let's do something<br />
practical and make a webpage with some of them. <br />
</span><br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;html&gt;<br />
&lt;title&gt; Woot my first page&lt;/title&gt;<br />
&lt;head&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;This is Heading one&lt;/h1&gt;&lt;br&gt;<br />
&lt;h2&gt;This is heading two &lt;/h2&gt;&lt;br&gt;<br />
&lt;p&gt; this is a paragraph. Look what it does. &lt;/p&gt;&lt;br&gt;<br />
&lt;center&gt; this is some centered text. &lt;/center&gt;&lt;br&gt;<br />
&lt;b&gt;This is some bold text&lt;/b&gt;&lt;br&gt;<br />
&lt;i&gt;this is some italic text. &lt;/i&gt;&lt;br&gt;<br />
&lt;u&gt;this is some underlined text&lt;/u&gt;&lt;br&gt;<br />
<br />
&lt;p&gt; That concludes this practical experiment, let's &lt;br&gt;<br />
see what else there is, eh? &lt;/p&gt;<br />
<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></div></div>
<span style="color: #87CEEB;"><br />
You'll noticed, I used every tag as they would be used, <br />
and that each tag with the exception of one, had an end tag to it. <br />
I first created the webpage by opening up the start html tag. <br />
then gave it a title, gave it a head, then a body with some content to <br />
it. Then ended the body and ended the webpage with the end tag to</span><span style="color: #FF0000;"><br />
&lt;html&gt;. </span><br />
<span style="color: #32CD32;"><br />
If you copy pasted that code into say, notepad, and then hit save as<br />
<br />
"all files", webpage.html (must have the .html or .htm extension.) then<br />
it should look like this: </span><br />
<br />
<img src="http://thehallowlife.com/webinar/examples/webpage1.png" border="0" alt="[Image: webpage1.png]" /><br />
---<br />
<br />
<span style="color: #32CD32;">If it doesn't, then there seems to be a problem in which case, feel free<br />
to PM me. </span><br />
---<br />
<span style="color: #1E90FF;"><br />
And this about covers lesson 1. This is primarily to get your toes wet<br />
to see if you'd like. If you feel I should teach it a different way then let<br />
me know, or if there is a way you feel I could have improved it, then let<br />
me know. (And trust me I did consider teaching it a different way). <br />
<br />
Each lesson is available for download, along with the examples and the<br />
source to each example. If you like how I teach, and you feel this will be<br />
a good course for you, then grab some soda or water or some kind of <br />
drink, because lesson two will work you hard to the bone with whats<br />
in store with it. <br />
<br />
Lesson two is by far at least 2-3 times bigger with much more content<br />
on HTML. </span><br />
<span style="color: #9370DB;"><br />
A link to the lesson: <a href="http://thehallowlife.com/webinar/lessons/class1.txt" target="_blank">http://thehallowlife.com/webinar/lessons/class1.txt</a><br />
(a video will be up soon, and I will link to that too)<br />
A link to the examples: <a href="http://thehallowlife.com/webinar/examples/webpage1.html" target="_blank">http://thehallowlife.com/webinar/examples/webpage1.html</a> and <a href="http://thehallowlife.com/webinar/examples/webpage1.png" target="_blank">http://thehallowlife.com/webinar/examples/webpage1.png</a> <br />
A link to the source code: <a href="http://thehallowlife.com/webinar/source/lesson1.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson1.txt</a></span><br />
<br />
-Viral.]]></description>
			<content:encoded><![CDATA[Thanks for viewing Viral's Web Basics Class. <br />
This is a series of lessons/tutorial for the class located<br />
here: <a href="http://thehallowlife.com/forums/showthread.php?tid=1672" target="_blank">http://thehallowlife.com/forums/showthread.php?tid=1672</a><br />
<br />
Lesson 1: HTML Basics. <br />
<br />
--<br />
<br />
<span style="color: #9370DB;">First things first, to learn HTML you have to know what it is. <br />
A lot of people think HTML is a programming or scripting language; <br />
this is incorrect. HTML is a Markup language. <br />
<br />
HTML stands for: Hyper Text Markup Language. <br />
<br />
HTML uses what's called "markup tags", to create web pages. It is<br />
by no means a scripting language. No markup tags, no web page. <br />
Every page you ever see on the internet uses mark up tags in some way. <br />
<br />
When you see a markup tag on a webpage, they usually are called<br />
"HTML tags". Well in conjunction with that, EVERY html tag you see<br />
start with "&lt;" and end with "&gt;". These are called angle brackets. <br />
HTML tags NORMALLY come in pairs, (e.g: &lt;html&gt;&lt;/html&gt;) and<br />
those tags are called "start tags" and "end tags" or aka opening and<br />
closing tags. </span><br />
--<br />
<br />
Moving along, a few things we will be going over in this lesson is how to<br />
get up a basic web page using some of the tags today. <br />
<br />
The first set of tags we will look at is: <br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;html&gt;&lt;/html&gt;<br />
&lt;title&gt;&lt;/title&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;body&gt;&lt;/body&gt;<br />
&lt;h1&gt;&lt;/h1&gt;<br />
&lt;h2&gt;&lt;/h2&gt;<br />
&lt;p&gt;&lt;/p&gt;<br />
&lt;b&gt;&lt;/b&gt;<br />
&lt;i&gt;&lt;/i&gt;<br />
&lt;u&gt;&lt;/u&gt;<br />
&lt;center&gt;&lt;/center&gt;<br />
&lt;br&gt;</code></div></div>
<span style="color: #87CEEB;"><br />
These are all very basic tags, and are on almost every webpage. <br />
Now, while it's not "ABSOLUTELY" needed to have any tags what so ever, <br />
it does help a great deal. <br />
<br />
Now let's see how we're gonna use them. : </span><br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;html&gt;&nbsp;&nbsp;== Start a webpage, <br />
&lt;/html&gt; == ends a webpage. <br />
&lt;title&gt; == Defines the title of a page. <br />
&lt;/title&gt; == ends the title tag. <br />
&lt;head&gt; == defines the start of the first set of content in a page, <br />
anything in this is loaded first, such as java script. <br />
&lt;/head&gt; == defines the ending of the head tag, goes to the next tag.<br />
&lt;body&gt; == this is the "main page bulk" this is where most of the webpage<br />
content will be. <br />
&lt;/body&gt; == ends the main page bulk. <br />
&lt;h1&gt; == defines the "heading" of the page, this shows up as the "first header"<br />
as per "h1" which means "heading 1". <br />
&lt;/h1&gt; == ends the first header. <br />
&lt;h2&gt; == same as heading one, just that it happens to be header two. <br />
&lt;/h2&gt; == ends the header 2 tags. you can technically have as many <br />
header tags as you like. <br />
&lt;p&gt; == starts a paragraph, this is called the paragraph tag. <br />
&lt;/p&gt; == ends a paragraph tag. <br />
&lt;b&gt; == start tag to making a word(s) bold. <br />
&lt;/b&gt; == end tag to bold. <br />
&lt;i&gt; == start tag to making word(s) italic. <br />
&lt;/i&gt; == end tag to italic. <br />
&lt;u&gt; == start tag to making word(s) underline.<br />
&lt;/u&gt; == end stag to underline. <br />
&lt;center&gt; == start tag to make content in between centered. <br />
&lt;/center&gt; == end tag to center. <br />
&lt;br&gt; a tag without the need of an end tag, it makes a line break. <br />
 meaning it goes to a new line.</code></div></div>
<span style="color: #87CEEB;"><br />
Now that we know what each one is, and what they do, let's do something<br />
practical and make a webpage with some of them. <br />
</span><br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>&lt;html&gt;<br />
&lt;title&gt; Woot my first page&lt;/title&gt;<br />
&lt;head&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;This is Heading one&lt;/h1&gt;&lt;br&gt;<br />
&lt;h2&gt;This is heading two &lt;/h2&gt;&lt;br&gt;<br />
&lt;p&gt; this is a paragraph. Look what it does. &lt;/p&gt;&lt;br&gt;<br />
&lt;center&gt; this is some centered text. &lt;/center&gt;&lt;br&gt;<br />
&lt;b&gt;This is some bold text&lt;/b&gt;&lt;br&gt;<br />
&lt;i&gt;this is some italic text. &lt;/i&gt;&lt;br&gt;<br />
&lt;u&gt;this is some underlined text&lt;/u&gt;&lt;br&gt;<br />
<br />
&lt;p&gt; That concludes this practical experiment, let's &lt;br&gt;<br />
see what else there is, eh? &lt;/p&gt;<br />
<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></div></div>
<span style="color: #87CEEB;"><br />
You'll noticed, I used every tag as they would be used, <br />
and that each tag with the exception of one, had an end tag to it. <br />
I first created the webpage by opening up the start html tag. <br />
then gave it a title, gave it a head, then a body with some content to <br />
it. Then ended the body and ended the webpage with the end tag to</span><span style="color: #FF0000;"><br />
&lt;html&gt;. </span><br />
<span style="color: #32CD32;"><br />
If you copy pasted that code into say, notepad, and then hit save as<br />
<br />
"all files", webpage.html (must have the .html or .htm extension.) then<br />
it should look like this: </span><br />
<br />
<img src="http://thehallowlife.com/webinar/examples/webpage1.png" border="0" alt="[Image: webpage1.png]" /><br />
---<br />
<br />
<span style="color: #32CD32;">If it doesn't, then there seems to be a problem in which case, feel free<br />
to PM me. </span><br />
---<br />
<span style="color: #1E90FF;"><br />
And this about covers lesson 1. This is primarily to get your toes wet<br />
to see if you'd like. If you feel I should teach it a different way then let<br />
me know, or if there is a way you feel I could have improved it, then let<br />
me know. (And trust me I did consider teaching it a different way). <br />
<br />
Each lesson is available for download, along with the examples and the<br />
source to each example. If you like how I teach, and you feel this will be<br />
a good course for you, then grab some soda or water or some kind of <br />
drink, because lesson two will work you hard to the bone with whats<br />
in store with it. <br />
<br />
Lesson two is by far at least 2-3 times bigger with much more content<br />
on HTML. </span><br />
<span style="color: #9370DB;"><br />
A link to the lesson: <a href="http://thehallowlife.com/webinar/lessons/class1.txt" target="_blank">http://thehallowlife.com/webinar/lessons/class1.txt</a><br />
(a video will be up soon, and I will link to that too)<br />
A link to the examples: <a href="http://thehallowlife.com/webinar/examples/webpage1.html" target="_blank">http://thehallowlife.com/webinar/examples/webpage1.html</a> and <a href="http://thehallowlife.com/webinar/examples/webpage1.png" target="_blank">http://thehallowlife.com/webinar/examples/webpage1.png</a> <br />
A link to the source code: <a href="http://thehallowlife.com/webinar/source/lesson1.txt" target="_blank">http://thehallowlife.com/webinar/source/lesson1.txt</a></span><br />
<br />
-Viral.]]></content:encoded>
		</item>
	</channel>
</rss>
