Sunday, 23 February 2014

Upload Page

Now that I have begun the construction of the user page I also felt it was important to construct the upload page alongside due to the short space of time. Within this section my aim is to develop both the design and functionality to the point where users can upload files onto the system. The reason for this is so that I can commence the user testing and analysis of the project.


Functionality
The first area of the functionality was the ability to select and upload a file successfully, I will attempt this before continuing the code to being able to save the file or folder onto the system. Originally the user page was designed on a HTML document but with the implementation of PHP i decided to create a new document and copy over the design code. 


Before working on the overall functionality of the upload page I wrote the upload form that will allow the user to upload a file form their computer or portable hard drive. The code provides a button where users click on, this function opens a window where all the files stored can be accessed this enables the user to locate their document. 


As you can see for the screen captures below there is a choose file button that opens up a window:



Once the file has been selected the page will display the name of the file selected enabling the user choose another file or submit the one that they have chosen so far. As you can see I chose one of my own files enterdata.php as a test. 


At this point in time the code only focuses on image format's therefore during the testing process the submit button was not able to process the command. The following page displayed the information of the file and then invalid file as the system has detected that it is not an image. 

I retested the system although this time I chose and image with the extension of .png so that the system accepts the file. This process will enable me to detect if there are further errors that have not been present. 


Once I selected the submit button the system processed the command and displayed the information of the file and where it has been stored temporarily. As you can see for the image below the system has detected the file as valid. 


Unfortunately the temporary file where the information has been stored i do not have access to therefore I will need to alter the temporary folder location in order to see of the files are being stored where they should be. 







Design
As I was going through the process of developing the upload function I decided to also add some design to the form. Unfortunately although I have written some CSS code there seems to be something within the code that is not processing the CSS. Below are the design results before I began problem solving within this document:




Sources
Barelyfitz.com. n.d. Learn CSS Positioning in Ten Steps: position static relative absolute float. [online] Available at: http://www.barelyfitz.com/screencast/html-training/css/positioning/ [Accessed: 24 Feb 2014].

Bytes.com. 2007. Uploading files into a MySQL database using PHP - PHP. [online] Available at: http://bytes.com/topic/php/insights/740327-uploading-files-into-mysql-database-using-php [Accessed: 24 Feb 2014].

W3schools.com. n.d. PHP File Upload. [online] Available at: http://www.w3schools.com/php/php_file_upload.asp [Accessed: 24 Feb 2014]

No comments:

Post a Comment