Send form data to PHP without the whole page reloading using jQuery Comments (1)
by Wez Pyke - September 7, 2009 in PHP,Text Tutorials

This is my screencast for the Nettuts/Screenr screencast competition. I feel as though I rushed it because I had to do it under 5 minutes but I hope you learn a thing or two from it.

Source Files

PHP Contact Form Comments (3)
by Wez Pyke - July 21, 2009 in PHP,Text Tutorials

Every website needs a way of contacting the people behind it and putting an email on a page is not such a good idea; because bots can easily pick up this email address and send spam to it. This is where a contact form comes in very useful because people can send you messages but do not get your email address. (more...)

PHP Class for Google Maps API Comments (17)
by Wez Pyke - July 20, 2009 in PHP,Text Tutorials

google maps logo small blue PHP Class for Google Maps APIA few days ago I was developing a website for a client. They required that there be a map showing where addresses are that were retrieved from a database. I have never properly looked at the Google Maps API before because I have never needed to use it; so for the first time I looked at it and gave it a try. Then after playing around with it for a bit i realised that reverse geocoding was needed to convert the address into latitude and longitude figures.

Because I was programming this website in PHP I thought I would have a look around for a PHP class to see if there was a quicker way of doing this. Luckily enough I found a PHP class called PHP GoogleMapAPI. It took me a few minutes to read through the documentation for this class but it was so straight forward and simple. All in all it takes only 6 lines of code using this class to create a google map and locate it to an address; because it does all the other work for you that you don't need to know about if you're not going to be programming Google Maps every day of your life.

(more...)

10 CakePHP Tutorials You Should Read Comments (1)
by Wez Pyke - July 15, 2009 in General,PHP

cake logo 10 CakePHP Tutorials You Should ReadThere are a number of frameworks available for PHP such as CodeIgnitor, Zend, Symfony, Kohana and many more. In this article you will find tutorials that I have found on the web that will help PHP programmers that are new to the MVC pattern or CakePHP.

CakePHP is an amazing framework if you know how to use it, but the documentation for CakePHP is quite badly written and can cause confusion for new users. Here are a few links to try and make life easier for new and experienced CakePHP users.

  1. Validation with CakePHP
  2. Theming with CakePHP
  3. Getting started quickly with Scriptaculous effects
  4. Drag 'n drop tutorial with the CakePHP 1.2 Ajax helper, Prototype framework and Scriptaculous library
  5. Secure CakePHP via Sessions & Magic (Login / Logout)
  6. CakePHP ACL Tutorial
  7. CakePHP Bake - Baking Models, Controllers and Views the CakePHP 1.2 Way
  8. Cascading Dynamic Meta Tags and Page Titles in CakePHP 1.2
  9. jQuery image upload & crop
  10. Uploader - Plugin
A Basic PHP Statistics Script Comments (3)
by Wez Pyke - March 8, 2009 in PHP

In this tutorial you will learn about writing information to a text file and then retrieving the information you wrote to the text file. Retrieving the files that are in a directory and about arrays.

This is a quite basic script and there isn't much to write about it so if there is something that you don't understand look the function up within the PHP manual online.
(more...)

Creating a WordPress plugin Comments (32)
by Wez Pyke - November 21, 2008 in PHP,Text Tutorials

The plugin that I'm going to show you how to create within this post is a plugin that I created for MakeUseOf.

Creating plugins for WP is relatively easy and uses actions to call functions that are included in pages within the main WP files. To learn more about creating plugins for WP go here.

Ok so lets get started with creating the plugin.

When creating a plugin for WP make sure that you include your own unique word or acronym to your functions so that they don't conflict with any other plugins that may be installed.

Because I created this for MakeUseOf the acronym I use is MUO and then AF because I named the plugin author footer so every function within this plugin begins with MUO_AF.
(more...)

PHP One Line IF Statement Comments (6)
by Wez Pyke - August 27, 2008 in PHP,Text Tutorials

I'm sure if you've been programming for a few years that you've come across when you need to check if something equals something than do something else a few times.

Well the best way to do this is like so.

Say for example we have a variable called $num and the value of it is 5.
(more...)

PHP News System Part 4 Comments (5)
by Wez Pyke - August 17, 2008 in PHP,Text Tutorials

If you haven't checked out the previous tutorials then click on the names to view them. Part 1, Part 2, Part3.

In Part 4 of this tutorial you are going to learn how to edit and delete your posts from the admin page.
(more...)

Sending Email With PHP Comments (0)
by Wez Pyke - August 4, 2008 in PHP,Text Tutorials

Email is used by most people that use the internet and is good for sending activation codes and notifications to users when you have a website.

To send an email you use the mail() function and it requires 3 parameters.

(more...)

Retrieving an RSS Feed in PHP Comments (9)
by Wez Pyke - in PHP,Text Tutorials

RSS Feeds are widely used throughout the internet today and on all kinds of websites. From websites like Digg to most blogs. If you want to display an RSS feed on your website its probably easier than you think.

For this example I'm going to show you how to display the RSS feed for The Tutorial Blog using PHP.

(more...)

« Newer PostsOlder Posts »