Posted by Kenny - South Coast Web on December 11th, 2009 | 1 comment
PHP Date Function
the php date function is great. i use it in virtually every website that i write. the copyright text at the bottom of this page uses the date function to determine which year to stamp on it.
The function is called quite simply by using:-
<?php
$date = date("Y") ;
echo $date ;
?>
So as you can see that will return you :- 2009
If you scroll down the page it will show the various letters to put into the date() to give you various different displays.
Posted by Kenny - South Coast Web on December 10th, 2009 | 0 comments
One of the main advantages to using PHP is the use of INCLUDES. With HTML web pages, to make a change to one menu option will involve you editting every single page. This can be very time consuming and nowadays something that will happen on a regular basis.
Using pHP and an INCLUDE you can do this just by having a menu in a seperate file and including it into the main page where you would like the menu to appear. My tutorials menu on the side is in an include, and so is the top of the page as well as the footer part.
You can also have a page with just variables that you will use every page and this can be used in an include.
Posted by Kenny - South Coast Web on December 9th, 2009 | 0 comments
PHP is great. It is so flexible, understandible and accepted throughout the world wide web. At south coast web we write alot of designs using PHP just for these reasons. My tutorials will involve alot of PHP as it is my favourite scripting language. firstly however we need to learn the basics. if you wish to read a complete tutorial that lists most commands please visit w3schools website and click the PHP links. I will try to help with a few simple tutorials that should get you along the way.
To start every webpage you write must end with the .php tag. this makes the server realise that there is PHP within the page. The page is written as a normal HTML layout but with the acceptance of PHP scripts within.