[Part 2] Add, Add, Add, Delete – A story of functions


So I'm learning to code

Continuing the journey of functions that I have used to create the photo upload site I will go on to detail those that are associated with the album generation below:

albumpart1

The first three functions that you can see above are as follows:

– album_data – This function is used to pull the information stored in the database about the users albums.  It is then stored in array, with the first field removed. This allows me to then call the information about each of the albums such as the title and description to display to the user.

– album_check – In this function we are checking to see if the album that has been requested belongs to the current user. if this is the case true is returned, if not false. We are then able to ensure that albums can’t be modified by an external party that isn’t the logged in user.

View original post 435 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s