MainelyDesign.com Blog

Showing articles 101 - 110 (146 total)

A Really Good Implementation of Captcha

Posted on 09/22/2009 at 02:45 pm | Viewed 9,135 times | 0 comments

Awesome Captcha Implementation I just experienced a version of Captcha that I actually like.  Instead of having to type in jumbled letters and phrases or answering simple questions, Service2Client actually asks you to identify the color of the letter in a certain position.  Not only does it fool spambots (I would assume anyway) but it's...

Faking Symlinks on Windows 2003

Posted on 09/17/2009 at 04:25 pm | Viewed 14,770 times | 0 comments

My production server is a LAMP server.  I love it.  I have one cental location for my CakePHP application and symlink the folders I need to each individual hosting account.  It's pretty easy to do and very powerful.  I work on another server that is Windows 2003.  Everytime I sit down to do work, I bemoan not having the ability to create...

Delete Dependent Just Deleted All My Records

Posted on 09/17/2009 at 10:12 am | Viewed 10,760 times | 0 comments

Oh man! I just deleted all my database records using $model->del($id) with dependent=>true in the model association.  That wasn't supposed to happen!  It turns out to be an issue with how I specified my model association.  What's weird is that everything works fine except when I go to do the delete with cascade set to true. Use an array for...

How do I reset the keys in a PHP array?

Posted on 09/11/2009 at 02:00 pm | Viewed 27,174 times | 0 comments

This answer was located at CodingForums.com on 9/11/09.  Answers written by PHP6 and Fou-Lu . I had been hunting for an answer to the elusive question of how do I reset array keys in PHP.  I finally found the perfect (and thorough) answer here. There are 3 ways to reset array keys in PHP.  All of these solutions work with numerically...

Date Input Using Cakephp Form Helper

Posted on 09/09/2009 at 03:29 pm | Viewed 29,809 times | 3 comments

I always forget what exactly needs to happen in order for CakePHP's form helper to work with date input fields.  I'm sick of tearing through old source code and looking at the official CakePHP docementation site .  Here's how to get it to work... Date Inputs Using the Form Helper: $current_year = date('Y'); $max_year = $current_year + 2; echo...

Invalid Date Value Error in MySQL

Posted on 09/09/2009 at 02:26 pm | Viewed 10,135 times | 0 comments

I ran into an interesting issue with valid dates and MySQL on Windows.  I wrote a CakePHP import function that basically moves MySQL data from one DB to the other.  I never thought that I would see an error related to an invalid date, but I did. What determines if a date value is invalid (read: warning) or unacceptable (read: error)? It turns...

Cakephp's Flay Class is Amazing - Examples Included

Posted on 09/08/2009 at 09:31 pm | Viewed 11,327 times | 0 comments

If you haven't checked out CakePHP's Flay class, check it out . It's one of the best utility classes for text output in CakePHP. I just noticed that my blog was using the same META description for all of my blog entries- not good for SEO.  Instead, I want to pull a fragment of the article copy and use that as my META description.  I currently...

Manually Installing MySQL on Windows 2003 Server

Posted on 09/02/2009 at 12:02 pm | Viewed 9,725 times | 0 comments

I have been trying to install MySQL on a web server running Windows 2003 for quite a while now.  I was finally successful! Here's how I did it... Does your server have a hard-coded IP address? If so, you need to make localhost refer to the manually assigned IP address in your hosts file.  This file is located in C:\Windows\System32\drivers\etc....

Using Exif in PHP on Windows

Posted on 08/28/2009 at 09:40 am | Viewed 9,766 times | 0 comments

I'm trying to use the exif functions in PHP on my Windows XP computer.  I want to read the meta data that is recorded by my digital camera (exif - exchangeable image file format ).  I like the idea of storing that exif data in the database, so it's searchable. I wasn't having any luck with exif_read_data(), but finally found this posting ....

Making Valid Email (mailto) links in CakePHP

Posted on 08/25/2009 at 04:59 pm | Viewed 13,090 times | 0 comments

It's easy to make an email address using the HTML's helper link() function.  All you need to do is have an email address appended with the string 'mailto:' (just like in regular ol' HTML). Here's my quick and dirty function to attach it if it doesn't exist: if(stristr($image['link'], '@') and stristr($image['link'], 'mailto') === false) {...

    7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15   

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design