search
top
Currently Browsing: Computing

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 the value of the last auto increment field inserted into the database. To do this I use the php mysql_insert_id();... read more

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 mobile pages. After the jealously of finding out my friend had a nice iTouch subsided I set to work to implement the detect... read more

Trojanised WordPress

As a daily reader of The Register website I was auite concerned when I came accross this article on a Trojanised version of WordPress doing the rounds on a fake site. Apparently this fake site – Wordpresz.org is offering the ‘latest version’ which is apparantly 2.6.4. However the latest official version from WordPress is 2.6.3 which I upgraded two blogs to yesterday (Wednesday 5th... read more

A Must With Any Windows System

You should NEVER use a machine with Admin privileges for everyday use. You should always use you computer using a restricted account and certainly not use the machine using your Admin Account unless you need to install software that you know and trust. Using a restricted account vastly decreases your chances of being compromised with spyware/adware and other nasties as these generally need admin privileges... read more

How to How to Uninstall McAfee Security Center

Having uninstalled McAfee Security Center because of the cost (please read my blog post on this) I thought I had better write this quick tutorial as uninstalling it was not so simple as hitting the uninstall button in Windows Add/Remove programs! The first step I undertook was to navigate to the windows control panel and then on Add/Remove programs. I then located the entry for McAfee Security Center and... read more

Basic Windows Security

Windows is a magnet for viruses, spyware and other types of malware more than any other operating system. Why you may ask? Well the simple answer is numbers, Windows is by far the most popular operating system in the world and with this in mind it has become a magnet for organised crime to make money. Most malware that we are seeing at the moment is designed to make money, be it by stealing your bank... read more

Resetting MySQL Auto Increment Field

After developing a number of systems in the past it is of course essential to completely test any piece of software. This of course means that any tables that use an auto_increment field will not start from 1 when the system goes live. Not a massive problem but it is nice sometimes to reset the value to 1. After searching around the web what seemed like an age I finally found the SQL that carry s out just... read more

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

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

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
Page 4 of 512345
top