Archive | PHP RSS feed for this section

PHP: Random string with numbers and letters

1. October 2007

95 Comments

I thought that some of you might find it useful to learn how to generate a random string or a random number with PHP. I wrote a quick function to use PHP to generate random. See it below : function genRandomString() {     $length = 10;     $characters = ’0123456789abcdefghijklmnopqrstuvwxyz’;     $string [...]

Continue reading...

PHP : Strip or find a file extension

29. September 2007

4 Comments

Getting a file’s extension is essential when working with uploads and other manipulations complying with files. You might have a user uploading a file and you need to rename the file before moving it from the temporary upload directory. In order to do so, you can obtain the file extension and then rename it to [...]

Continue reading...

WordPress Pagination Class

28. September 2007

1 Comment

I wrote a simple, yet extremely useful WordPress pagination class. The class is not complete yet, and I work on it as I move along and need new features or actions. So you have the freedom to take the class and customize/expand it as you might need to. First off, you can download the class [...]

Continue reading...

WordPress Mailing List v2.0

28. September 2007

0 Comments

The WordPress mailing list plugin v2.0 has been released to the public with a great set of new features. These features include : Multiple mailing lists Email scheduling Newsletter templates Automatic updates indicator Improved sidebar widget with Ajax Post/page opt-in form embedding Email queue CSV and MacOS Address book importing Excel CSV file exporting And [...]

Continue reading...

CakePHP : Delete multiple records

20. September 2007

6 Comments

With CakePHP, you can remove multiple records from a database table using the deleteAll() model method. deleteAll() Usage $this -> Model -> deleteAll($conditions, $cascade = true); Lets say that you wanted to remove all the records for a specific user from the Item model. Below is a quick example. deleteAll() Example $this -> Item -> [...]

Continue reading...