create
Password Validation Class In PHP
Tue, 09/15/2009 - 08:20 | by philipnorton42When validating a password it is easy enough to make sure that the password is of a certain length, but what happens if you want to make sure that the password has at least one number, or contains a mixture of upper and lowercase letters? I recently had to validate a password like this and so I created a password validation class that allows easy validation of a password string to a set of given parameters, but also allow these parameters to be changed when needed.
Backup MySQL Database PHP Script
Wed, 08/12/2009 - 09:10 | by philipnorton42There are quite a few scripts available on the Internet that allow you to dump data from a database into a format that can be used to replicate that database structure elsewhere. The following function is my take on this commonly occurring script.
Create A File Or Directory With Phing
Wed, 01/14/2009 - 15:56 | by philipnorton42After following the last post on deleting files and directories in Phing you might now be wondering if you can create things as well. The answer is yes.
To create a directory with Phing you need to use the mkdir element. The dir attribute is used to give the name of the directory to be created. The following example will create a directory called myProject_build in the current working directory (ie. where you are running phing from).
Creating Some Simple Flex Interface Elements
Tue, 11/04/2008 - 12:21 | by philipnorton42Following on from my previous blog post about installing Flex on Windows I thought I would go through how to create an interface using mxml. When you create a Flex 3 project the first file you are given is called Main.mxml, which has the following content.
Transform Text Links Into Anchors
Wed, 05/28/2008 - 13:27 | by philipnorton42Using the strip_tags() function on any user generated input should be common practice in order to stop users putting in odd bits of HTML and messing up your nicely coded HTML. You might want to allow anchor tags to be used, which is fine, but some users might use this to include onmouseover and other events in order to run JavaScript annoyances on the page.
So after stripping all tags from your text you can then run the following function to turn any links into anchor elements. This will work with any plain text that you want to use it on.