Saturday, 23 January 2010

Comment away!!

After many, many, many hours of brain scratching, stress and anger, I have finally got my comment system working. The comments system allows users to add comments to each different dreams. On the homepage it will display a link that shows the word "Comments" and then showing a number in brackets displaying how many comments that dream has, for example "(3)". When a user clicks this link it will take them to a page that displays the dream on it' own with no other dreams. Then all the comments that have been written will be displayed. (Just thinking about this now, I may need to add pagination to the comments system). Underneath the comments then is a form that allows people to add more comments. The comments are being submitted into a database via the form, and then the script is pulling the comments from the database and displaying them on the page.

I followed this tutorial which you can view here that was shown to me by my friend Scott Llewellyn. I had to alter a lot of the code because it wasn't working as it should have been. I had to change all the "&lt;" and ">" to "<" and ">" because this stopped the whole script from working properly. Obviously I also had to edit the code to suite my database and names etc. I had many problems with this script and had to get help from PHP Freaks Forum to help me with them. I have to acknowledge that people have helped me with this and cannot say I did it all on my own because that would be untrue. I don't think I would have been able to solve the problems without the help if I'm truly honest. However, from the help I have received, I can see where I have gone wrong and have learnt from this. The comment system I have in place at the moment is in a file on it's own and so I now need to get it integrated with the actual website itself so it can fit in with the whole design and workings of the website.

I have know got two of the three major parts of the website working which has been great progress throughout the month of January. I have learnt a lot during this time, and probably spent the most time of my life coding and practicing web work, which I have thoroughly enjoyed. Once I have added the comment system to the website I must then move on to the ratings system for the website.

No comments:

Post a Comment