Aber LINKS Website – PHP

I have used PHP on the Aber LINKS site to make the site more interactive and maintainable. The main use I have used it for at the moment is server side includes – where some common code across many pages is pulled from just one file. This means the code is written just once, and only has to be modified once to affect all pages. I also created a “template” page – with the headers, footers, nav bar, menu and main area all set out ready to receive content. This allows for easy page adding whilst keeping all pages consistent.

Adding a new page

How hard is it? It’s only as hard as you make it. Using PHP, it can be really easy and I follow the following steps with my site:

  1. Make a copy of my template page
  2. Add the content into the main area for the new page
  3. Update the menu and nav bar includes to include the link to the new page
  4. Upload the new page, and updated nav bar and menu.
As you  can see it is very easy to add a new page – as the layout is all done and ready for me. To modify the menu and nav bar across all pages, I have to modify just one file each.
What else to use PHP for?
Currently I also use PHP mail for the contact form. I learnt this code from W3Schools – click here for a link to their page on Secure E-mail with PHP. I have also found it is easy to add another recipient to the PHP mail, by just simply adding “,anotheremail@domain.com” (remember the comma) to the String of who the mail will be sent to.
We currently have no real use for an SQL database at the moment, however I would be ready to use one after doing this assignment.

[It is worth saying at this point, when I refer to Aber LINKS - I do mean Aberystwyth LINKS (St John Cymru - Wales First Aid Society at Aberystwyth University), just in case another place gets a LINKS unit (Aberdeen, Aberdovey etc) and calls themselves Aber LINKS. ]