Monday, 10 February 2014

Upload Profile Image

Although the design still has not been completed time is catching up and the project functionality reds to be developed and tested. The design will be altered and finished further down the line it might not be ready for VIVA 2 although it will be completed for VIVA 3. 


I created a separate php file called uploadimage.php where I implemented php code that will enable the user to upload an image. The circle design displayed has disappeared due to the extra code therefore I will need to adjust the code in order to be displayed within the circle.


Once the button is clicked the users file window appears so that they can upload an image to their accounts.


The image itself needs restrictions in various forms regarding the file extensions and the image sizing. Here I have restricted the image file extensions to only accept jpeg, png and gif. Users will not be allowed to upload any other form as their profile picture. 

Another form of restrictions are image sizing, within this page users will have to upload onto the circle container therefore it has to be within the dimensions. I have created a maximum size of 200 at this time although this might be altered at a later stage. Within the code I created an echo that will inform the user if they have exceed the size limit in order for them to retry. 


The last section of the code provides users will feedback on the actions they have just undertaken. If the image is successful duplicated from the computer onto the image container they will be informed that their upload has been successful. 




No comments:

Post a Comment