Oct 20th 08
Connecting to MySQL with PHP
Connecting to a mysql database is pretty easy using php as it gives you all the commands you need in order to do it. This example is a basic way to do, there are other methods but I found this way useful when I was just starting out! Here is an example of connecting and quering a mysql... read more
Oct 20th 08
Basic PHP – Assigning Values to Variables
Adding values to php variables is simple as the following examples shows The example code above will add the value Bobby to the variable $name and 30 to the variable age. You can print the value of the variable out to the browser by using the echo statement as follows. Further to this we could add this html to a page. Hi my name is ; and my age is This will print out Hi my name is Bobby and my age is... read more
Sep 16th 08
Basic PHP – The Hello World Program
This is a simple program to start you off using php scripting. This small program prints out “Hello World” to your browser using php rather than plain html. Type the following into a text editor and save the file as test.php If you point your browser to this file you will see Hello World! displayed in your browser, well done you have just completed your first php program! PHP Common... read more
