tags: apache   archive   business   charity   climbing   cluster   comic   database   email   exchange   family   fm2008   hack   humour   linux   liverpool   microsoft   money   mysql   network   oes   opensource   outlook   php   pictures   poem   process   project   real_life   review   rss   science   security   software   sql   thought   tsm   updates   webdev   website   windows  

Galactic Kingdoms

Mon, 18 Aug 2008 12:23:18

A friend of mine, Michael Pagan, is currently writing a PHP based space game.
galactic kingdoms
It will be free to play and very easy to learn. From what I've seen, it's looking very promising and he's making excellent headway with the development.

Here's the main man crunching some numbers in ours on Saturday.
michael pagan
The game's not open to the public as it's only about 20% written, but as soon as we're after beta testers I'll let you know. Check back for further updates.

Cheers
Ryan Partington

Pagination

Tue, 04 Dec 2007 04:18:06

Pagination is where you have your query broke down into sections and then add "Next/Previous" buttons to your page. We're going to look at some PHP code which runs through the basics of this operation. If you'd like to learn PHP from scratch check out the 5 part introduction to PHP here: http://ryanpartington.com/tags/php/ (down by the bottom). Now lets get started... (click 'View Page' for full article)

Cheers
Ryan Partington

PHP upload script

Mon, 05 Nov 2007 04:09:22

If you're after a php upload script with good instructions, try this page http://www.phpbuilder.com/columns/bealers20000904.php3 I've taken a copy of the code and put it at the bottom on this article if you're confident you can figure it out. Darren Beale has taken his time to put together some easy to follow instructions with clear explanations. (Click view page to see script)

Cheers
Ryan Partington

PHP - Using numbers

Thu, 25 Oct 2007 02:47:32

When using numbers within PHP for mathimatical caclulations we do not set them up as strings.

$var1 = 0 //correct
$var1 = "0" //would be incorrect

As in math, whole numbers, negative or positive, and zero are considered Integers

Cheers
Ryan Partington

PHP - Difference with quotes

Wed, 24 Oct 2007 02:51:09

Today we're going to focus on a 60 second refresh. The question we've been asked is this "What's the difference when working with a string and single quotes or double quotes?" We answer with an example. (Click view page to see example)

Cheers
Ryan Partington

String to time

Tue, 09 Oct 2007 15:43:55

Changing a date format with PHP. Today I had to change a load of rows which had the date stored as 'd M Y H:i:s' to the mysql DATETIME format of 'Y-m-d H:i:s'. The way I went about this was using the http://www.php.net/strtotime strtotime function within PHP. (Click view page to see the example code)

Cheers
Ryan Partington

For Each (php)

Mon, 08 Oct 2007 06:23:34

You have an array and you'd like to perform a function on each element. If you're new you may write your script to perform the function on array(0) to array (x) knowing you'll never exceed (x). This will causes "Undefined offset" error messages in your log. What you should be doing is using the foreach function.

Lets take a look at the example from http://uk2.php.net/foreach (to view the rest of this article click 'view page' from below)

PHP Script - URL to Hyperlink

Wed, 26 Sep 2007 06:23:14

I've just put together this simple function which will convert your URL into a hyperlink. I've got the script stored in another file and include it on the pages I require, ie 'new article page'/'modify article page'. (Click 'view page' to see the code)

Enjoy
Ryan Partington

Basics of PHP - Part 5

Fri, 31 Aug 2007 03:09:27

Our final chapter looks at calling a row from our mysql database. To begin lets look at our code in full. For explanations on how the code works, see part 1 through 4. (click view page to view full article)

Cheers
Ryan Partington

Basics of PHP - Part 4

Wed, 29 Aug 2007 06:01:58

Yesterday we looked at defining our variables in preparation for the database connection. Today we make the connection. (Click view page for full article)

Cheers
Ryan Partington

Basics of PHP - Part 3

Tue, 28 Aug 2007 10:17:12

PHP is based around it's ability to connect to a MySQL database. Let's take a look at a script used to connect to a database. (Click view page to see code)

Cheers
Ryan Partington

Basics of PHP - Part 2

Thu, 23 Aug 2007 07:46:55

Today we'll start by storing a variable. A variable is like an alias, a friendly name for a particular string you've predefined. Don't worry about new lines when writing your script, php ignores them. (Click view page to read more)

Stay tuned
Ryan Partington

Basics of PHP - Part 1

Wed, 22 Aug 2007 07:40:46

Over the next few days I would like to introduce you to the basic principles of PHP. As always it will take you no longer than 60 seconds to scan over the information and pick up some ideas. (Click view page to read more)

Cheers
Ryan Partington

XHTML compliant comment script PHP

Thu, 28 Jun 2007 08:50:18

I have modified this script so it is XHTML 1.1 compliant. Although the script is advertised as compliant, I found issues when using the image verification system. I've repackaged my version with the original config files. See the edited version live here where you can also perform a XHTML compliance test at the bottom of the page. This edit is of version 5 of the original script.

Enjoy
Ryan Partington