IT 322 Deadline for Exercises

Please complete all your exercise by September 4, 2010 (Saturday). I will be checking your account.

Please follow the following format

1.) Create a Main Folder with your Full Name [ex. Armand_Serenio] as the title

2.) Inside your main folder, create sub folders and title it according to the exercise number [ex. Exer1]

3.) Save you exercises (html, php and css) in the sub folder you create

Note: If I don’t see the folder structure in you account, I will not bother to check it or open any folders inside. Only the main folder and the subfolders will be opened.

IT 322 and IT 413

For IT 322 your Midterm will be on Aug 26, 2010 (Lab Time)

Coverage :

  • HTML Tags
  • CSS Declaration
  • PHP Variables
  • PHP Forms

IT 413 : Submit your Site Documentation on August 28, 2010 (Lab Time) August 31, 2010

Requirements :

  • Cover Page
  • Company Profile
  • Site Map
  • Site Template (1 each, 1 final template)

PHP Script for Uploading Files

A lot of you are asking how to upload images using HTML Form and PHP. We’ll here is a simple script for that.

Here is the FORM will be using

<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>

Here is a brief description of the important parts of the above code:

  • enctype=”multipart/form-data” – Necessary for our to-be-created PHP file to function properly.
  • action=”uploader.php” – The name of our PHP page that will be created, shortly.
  • method=”POST” – Informs the browser that we want to send information to the server using POST.
  • input type=”hidden” name=”MA… – Sets the maximum allowable file size, in bytes, that can be uploaded. This safety mechanism is easily bypassed and we will show a solid backup solution in PHP. We have set the max file size to 100KB in this example.
  • input name=”uploadedfile” uploadedfile is how we will access the file in our PHP script.

Here is the PHP Script

$target_path = "uploads/";

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
}

When the uploader.php file is executed, the uploaded file exists in a temporary storage area on the server. If the file is not moved to a different location it will be destroyed! To save our precious file we are going to need to make use of the $_FILES associative array.

The $_FILES array is where PHP stores all the information about files. There are two elements of this array that we will need to understand for this example.

  • uploadedfileuploadedfile is the reference we assigned in our HTML form. We will need this to tell the $_FILES array which file we want to play around with.
  • $_FILES['uploadedfile']['name']name contains the original path of the user uploaded file.
  • $_FILES['uploadedfile']['tmp_name']tmp_name contains the path to the temporary file that resides on the server. The file should exist on the server in a temporary directory with a temporary name.

Now we can finally start to write a basic PHP upload manager script! Here is how we would get the temporary file name, choose a permanent name, and choose a place to store the file.

NOTE: You will need to create a new directory in the directory where uploader.php resides, called “uploads”, as we are going to be saving files there.

We now have all we need to successfully save our file to the server. $target_path contains the path where we want to save our file to.

source : http://www.tizag.com/phpT/fileupload.php

Announcement: IT 413 and IT 322

I will not be able to meet you starting tuesday, July 20 until Saturday July 24, 2010 because I am going to take a 4 day leave to prepare for my wedding. I am getting married this coming July 23. Please continue on with your exercises.

IT 413, finalize your Header/Footer Template and ready your sitemap for Tuesday (July 27, 2010).

IT 322, finish your header, navigation and footer. We will discuss on the page content and side panels on Monday (July 26, 2010).

IT 322 (July 8, 2010)

I have some important matters to finish so I can’t meet you today, please continue on with your Resume (Header and Navigation). Search for CSS styles that are available on the web. Research on how to make your Resume stand out.

I will check your work next laboratory.

Announcement: IT 413 (No Class)

Because UC will host the Nursing Board Exam tomorrow (July 3, 2010) there will be no classes/laboratory for IT-413. I will give you the time to visit your respective company to gain information and and finalize your company profile. For those who hasn’t yet found a company/business, then use the time tomorrow to look for one.

On Tuesday I will get the company profile and the cover page (for those who hasn’t passed).

IT-413 Documentation

Attention IT-413 Students,

You need to finalize your Company so that you can submit your Site Documentation. If you need me to sign your proposal letters, just approach me at the EDP from 1pm to 8pm. Also don’t forget to register a free domain after everything is settled.

The things that I will require in the Site Documentation is

1.) Cover Page (click here to view sample layout)

2.) Proposal Letter / Recommendation Letter / Letter of Agreement

3.) Company Profile

HTML and CSS Cheat Sheets

To all IT 322 and IT 413 Students, please download and print css-cheat-sheet-v2 and html-cheat-sheet-v1 we will be using this as a quick reference to CSS and HTML markups. If the files I uploaded are a bit confusing then you can alternately view this and this one.

Welcome Students

Hello Students,

Welcome to your new e-class. If you remembered (for those who we’re IT322 once) that this site used to be a forum. I noticed that students barely visit it and interact so I decided to use blog-type siteĀ  which is much easier to manage and loads much faster (I think). The purpose of this site is to update you on the things we will or have discussed and to keep you posted on announcements and notes that will be available for download.

By registering, you can interact with the sites functionality like the BBPress plugin which acts like a mini-networking platform (similar to facebook/friendster) and the BBPress Forum.

For those who wants to visit the old forum I moved it here