PHP Tip #3: The Ternary Operator
This is probably one of my favorite PHP features. It can be a little complicated to get used to at first, but it really saves a lot of time & can be extremely useful.
Read moreThis is probably one of my favorite PHP features. It can be a little complicated to get used to at first, but it really saves a lot of time & can be extremely useful.
Read moreThe second in my series of PHP tips is to do with the extremely handy is_numeric(). When allowing user input it’s extremely important to check the input for attacks. The most common piece of information handed to MySQL is an ID, but novice coders can get confused with how to check the input. The main problem is that you only […]
Read moreThis is the first in a series of posts I’m doing on small tips which help when coding with PHP. The first is a one most devs probably know, but novice or new coders may not know and probably should.
Read moreA few days ago, before the hacking malarky, I needed a script that I could run via Cron to delete the contents of a folder that were older than a week from a certain day. For example; Let’s say it’s Saturday, I want the script to delete all files older than Saturday… Get what I mean. Right. Let’s continue.
Read moreI have recently been installing ImageMagick on my server for use on my other site Celeb O Rama, but because I am on Dreamhost I can’t just install what I like, like you would on a server that you own. So by using the Dreamhost Wiki I installed ImageMagick, but there are no instructions on how to install Imagick. The […]
Read moreSo you’ve just installed ImageMagick, but how do you make your thumbnails in it? Ahhh, a very good question my friend. Why Not Use Imagick? Well like my server, not all servers have the Imagick extention for PHP installed. Also I think (personal opinion, shock) the command line is a better way to use ImageMagick. Right let’s get to it.
Read moreI thought I’d make this little tid bit of a post for anyone who is interested. I was recently using GD to make an uploader, as I mentioned in the last post. Yesterday someone contacted me saying it produced an error, but the error was blank. Very odd! So I shut it down so I could do some debugging & […]
Read moreRecently I made an image uploader for my other website & I noticed that there isn’t a lot of tutorials around on how to crop thumbnails into squares. This tutorial requires that GD is enabled in PHP, I’m not sure whether you need GD2 or not but I don’t see any reason for it not to work in older versions […]
Read moreOk, so yesterday I did a tutorial about making a animation similar to that which WordPress uses when you delete posts etc. You know the fade to red & slide up thing… Yep? Good.
Read moreOk, so I don’t want to act like I’m copying or anything, but a few people asked me recently how to make an animation like WordPress has when it deletes a row in it’s tables. Well in Mootools it can be acheved by following this great tutorial by David Walsh. However I was asked how to do it in jQuery. […]
Read more
Recent Comments