Added code so that in the edit mode, the values are shown in a format which has
input fields with names and everything else setup.

TODO: Write the update profile function in the model that will update the database
using the values filled in by the user.
Cleaned up the code. Removed all the print_r statements
[added] a button at the top of every sponsor's profile. Pressing this button will take
the user to the edit profile page of that sponsor.

[added] An allotment check. Directly called the function that was already defined in
the model for displaying the sponsor to check if the editprofile view of the
sponsor id that is being accessed is has been allotted to the person who is logged in.
[added] meaningful data separators just as in the show profile view.
[major]

1. Changed the query for getting the data from all the tables.

The previous returned the same column (companyid) which was being used
to join all the tables again and again. This was causing problems in the name
of the post variables that were being generated.

So changed the query to natural join, which removes the duplicate columns.

2. Added the interface for editing. Not yet added anything else.

The data is being submitted.

3. Changed the submit function that will be called when the submit
is clicked inside the form
Added the where companyid clause.
[completed] Sponsor profile can be edited now.
[clean-up] Removed some echo statements that were remaining.

Also, used redirect to move to the show profile page if the query is executed
successfully.
Merge branch 'master' into spons-edit-profile
Added a discard changes button at the top of the edit profile view which
will take the user back to the showprofile view.

Also, added instructions regarding the format of the date to be used.
Added a check in the edit profile function so that the user can only
edit the profile of sponsors allotted to him/her.
Merge pull request #16 from icyflame/spons-edit-profile

Sponsorship Portal: Profile Editing, Second and Final Phase