PHP Project: Evaluation & Reflection

June 18, 2007 at 1:56 am | Posted in 03_PHP | Leave a comment

From the outset this project was going to be a tough challenge as I signed on fully aware that there is no formal Uni support for this module anymore.
It was the make or break decision if I could complete the course as the last full time student on the old structure of Interactive Multimedia (now Interaction Design) though so I accepted not really knowing what to expect as I am not a natural born programmer by any means.

My brief was to create a simple website using PHP and a mySQL database for a subject of my choice.

I borrowed the PHP Visual Quickstart Guide from the library and Amy kindly scanned her old lecture notes for me to get me started with the subject.
Other sources I found invaluable are bookmarked on my delicious page at http://del.icio.us/cklavery/PHP.

I bought some shared server space at mediatemple & started reading the book to get some theoretical background knowledge and pretty soon started to try my luck with the coding – what a great feeling it was to see the first simple php “hello world” echo appear online.

I downloaded the package MAMP which includes everything you need to have a local server configured on your computer and as my MAC has Apache running by default this was supposed to be a whizz. I really started struggling with this package and after some research opted to develop directly on my shared webserver at mediatemple. From my understanding using a local server and then transferring to your remote server would have also meant recreating the paths everytime and as I wasn’t part of a developer team who develop locally first and then upload it didn#t make much sense to me using this methodology.

The whole process was a huge trial and error exercise and eventually I started to get to grips with some basic concepts, looking at other people’s code and trying to make sense of it all. The same is true for figuring out the whole structure of my shared webspace at mediatemple, although they use an attractive GUI the underlying folder structure can be quite confusing.

What was great is that mediatemple already has PHP MyAdmin installed which is a good tool once you can establish a connection to your mySQL database which took quite a myriad of parse errors to manage.

The final website I have online now uses one SQL database (I found out I can only have two set up with my price plan at mediatemple) with different tables containing the data relevant to my subject: The Golden Era of Jamaican Music.

There is an introductory page written in valid XHTML & CSS leading to the different music genres and also an About Page which can be navigated at the footer of each page.

The genre pages also use XHTML transitional (which doesn’t validate completely but still works fine) and valid CSS to keep in line with the overall site styling. There are relevant images at the top of each page which set in the same violet tone as the background colour for content – this in conjunction with the orange tiling in the page background is a tribute to the colours of Trojan Records one of the most important labels for Jamaican music.

Ideally I wanted to have the structure album ->artist-> year -> label -> genre -> textfield for comments and then filter the data by genre to be displayed on the relevant page for Ska, Rocksteady or Reggae.

I couldn’t achieve this and after many,many tries I resolved to plan B thereby creating a seperate table for each genre.

Thanks to the fantastic support from my mate Axel (whom I also pestered in panic via Skype the Thursday before hand-in) I then set up tables that define the relationship artist to label and artist to album which then later make sense for the PHP inside the websites HTML code.

I feel the overall final website has achieved everything I needed to do plus a little extra e.g. the field for comments checks that you enter something in every field – if not you are prompted to go back and try again; when you have submitted the comment you get a message saying Thank You.

This was a really steep learning curve and the only reference php based website from last year I had from my peers is Penny’s (as both Mike’s and Adrian’s projects are no longer online) and I feel mine is an adequate solution for the brief.

—————————————————————————————————————————————————————————

See related development files on this shared box acccount: http://www.box.net/shared/4gmnfaz5z

Related online research bookmarked here: http://del.icio.us/cklavery/PHP.

PHP Project finalised

June 16, 2007 at 10:58 pm | Posted in 03_PHP | Leave a comment

Phew, seems now everything is working as expected.

A last cruncher has been the formatting and display of the submitted comments,which are now fixed.

php_leavecomment.jpg

php_feedback160607.jpg

php_commentmade160607.jpg

As a reminder , here’s the URL again: http://cklavery.net/uni/pgdip/php_module/site/index.html

Unknown error when creating a new databse

June 15, 2007 at 10:42 pm | Posted in 03_PHP | Leave a comment

db_error.jpg

Table set up offline

June 14, 2007 at 10:52 pm | Posted in 03_PHP | Comments Off

It can get a bit confusing working directly in PHP myAdmin so I created a tiny table in NeoOffice tomake the relationship structure clear1st_db.jpg

Images for the PHP website

June 8, 2007 at 10:16 pm | Posted in 03_PHP | Leave a comment

 

alton ellis

Altin Ellis – Rocksteady

maytalsdance.jpg

Toots & The Maytals – Reggae

aitken2.gif

Laurel Aitken – Ska

trojan_70.gif

trojan_logo.jpg

 

bsi_troj02.gif

Trojan Records

 

 

 

Set up a website to test my php coding

May 14, 2007 at 10:22 pm | Posted in 03_PHP | Leave a comment

PHP test website: http://cklavery.net/uni/pgdip/php_module/site/index.html

Trying to connect to MySQL – Error message

March 11, 2007 at 11:43 am | Posted in 03_PHP | Leave a comment

I followed the instructions on page 347 in “PHP for the Worldwide Web” in order to connect to MySQL

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″ />
<title>Connect to mySQL test </title>
</head>

<body>
<?php // Script 12.1 – mysql_connect.php
ini_set (‘display_errors’, 1);
error reporting (E_ALL & ~E_Notice);

if ($dbc = mysql_connect (‘localhost’ , ‘XX(I don’t want to display username on the blog. Clive)’ ,’XX(I don’t want to display password the blog. Clive)’)) {
print ‘<p>Successfully connected to MySQL.</p>’;
mysql_close();
} else {
print ‘<p>Did not work mate!.</>
}
?>

</body>
</html>

I got this error message:

Parse error: parse error, unexpected T_STRING in /home/virtual/site196/fst/var/www/html/mysql_connect.php on line 11

Testing if PHP runs on my server

March 10, 2007 at 9:25 pm | Posted in 03_PHP | Leave a comment

Hooray, that’s the first hurdle taken:

http://cklavery.net/hello.php

Webspace bought

March 8, 2007 at 10:00 pm | Posted in 03_PHP | Leave a comment

I bought some server space  with meditatemple today , a hosting company I have always seen mentioned on good designers’ websites.
Judging by the client list they ‘ll just be good enough for me…

PHP Kick Off

February 18, 2007 at 10:09 pm | Posted in 03_PHP | Leave a comment

So here we go. This is going to be a challenge without any formal Uni support – I need to do this PHP project as I am the last full time student for the old Interactive Multimedia course (now Interaction Design) and this box has to be ticked. No support though anymore as this module isn’t part of the new structure – keep your fingers crossed please!

The brief is to create simple website using PHP &  a mySQL database. The subject matter of the website is up to me but it must demonstrate a basic understanding of this server sided technology & database model.

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.