Archive for the ‘eLearning’ Category

More PHP info

Tuesday, September 25th, 2007

Hello!

 I know I haven’t written an entry for a while. I’ve been teaching myself PHP and one thing I could not figure out for the longest time. Well I finally figured it out.

When Querying a MySQL database PHP does not send the results back in an Array!!! You have to convert each row of the results into an array. You will have to use the function:

mysql_fetch_assoc($row)

There are two main ways of completely dumping out the contents of the array. My favorite way I find is the method I will show you. I’ve read in several different places that it is also the fastest as well. Here it is:

      while ($row = mysql_fetch_assoc($result)) {
         print “Row $rowcount<br />”;
  
         foreach ($row as $key => $val) {
            print “$key = $val<br />\n”;
         }
           
         print “<br />”;
         ++$rowcount;
      }

HTML theory

Tuesday, July 17th, 2007

If you a serious about programming in HTML and CSS then there is someone I need you to meet. The Tag’s name is “div”. <Div> will help you to visually create “divisions” or space on your page. Before you can start using <div>’s you must also know that they like to be contained. What I mean by this is that they like to have <div>’s within <div>’s. When creating a page I recommend creating a “wrapper”. Wrappers are another name for containers. For example: I recommend that you create a page wrapper, a header wrapper, a main body wrapper, and footer wrapper. This is the typical web page layout. First you would create the page wrapper <div> and then put the Header, MainBody, and Footer <div>s within the page wrapper. Here is the code needed for making this basic setup.

<div id=pageWrapper>

<div id=headerWrapper>

</div>

<div id=mainBodyWrapper>

</div>

<div id=footerWrapper>

</div>

</div>

Now that you have created these <div> objects you can now use CSS to effect the style and layout.

For Example - If you wanted to center the page you can physically move the <div id=mainPageWrapper> to the center of the screen. Because all <div>’s are inside the div they too are centered. This process is often called Cascading. Next lesson we will look at how we can force the page to be compatible in all browsers using CSS

HTML & CSS elearning Series comming to Winnipeg Experts

Friday, July 6th, 2007

I am going to give back to the digital community. I just recently found out that I’m a Visual Spatial learner. I am going to be giving examples that I believe will help VSL’s and non-VSL’s a like.

The first few Blog posting are going to give definitions of HTML code. This will be the building blocks for the rest of the topics I will be diving into. I am also going to be creating an eLearning Catagory will contain all the blog entries on coding. My examples I will be providing will be using Dreamweaver to code the pages. I must warn you that you might be tempted to use the “Designer” mode!! Do not do this as I find Dreamweaver does some pretty weird things. Then when things go wrong (and trust me once you start working with Div tags they will) you will be happy that you took the 20 minutes to learn basic HTML!!!.