Forte Web Solutions South Wales. Contact us today.

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 …

Basic PHP – Assigning Values to Variables

Adding values to php variables is simple as the following examples shows <?php $name = “Bobby”; $age = “30″; ?> 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 …

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 <?php echo “hello World”; ?> If you point your browser to this file you …