Forte Web Solutions South Wales. Contact us today.

NextGEN Gallery Thumbnail Generation Error

Thumbnail Generation PHP Memory Limit NextGEN Gallery If you are having trouble generating thumbnails with NextGEN Gallery, this could be down to your web hosts default memory usage allocation for PHP applications. Increasing the memory usage for PHP Applications You can increase the memory usage allocation for an individual PHP applications, such as NextGEN gallery, …

Database Connections Outside of Webroot

For extra security many often store their database connection credentials outside of the web root. This is fairly easy to achieve without to much work. For those of you who are unsure how to store database connection credentials in a separate file please refer to my article on Connecting to MySQL with PHP Once you …

Getting The Last Auto Increment Field With PHP

On many occasions you need to find the value of the last auto increment field inserted into a MySQL table. For example within my Content Management System if someone creates a new web page and saves it the user is taken back to edit this new page. In order to do this I must retrieve …

Detecting Mobile Devices with PHP

I have been using a great function written by Andy Moore on one of my personal sites that I run for my friends to detect Mobile Phones with php which worked a treat until a friend of mine bought himself a nice shiny iTouch and found the site still redirected him to the sites dedicated …

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 …