Posts Tagged "PHP"

Populating Multiple Drop-downs Dynamically

First off I want to say that there are multiple ways of doing something like this. Below is two ways (and I mention a third) to dynamically populate one drop down using the selection of another drop down (aka chaining drop-downs). One way we will see uses a pure JavaScript implementation and another is using a combination of JavaScript and a server-side language (here we are demonstrating PHP). After we ...

Applying Enchantments for PHP RPG Games – One Approach

So you want to build a PHP game and are just now learning how to do it. You fired up your browser and began searching for various game articles and perhaps you have found very little. What you did find might not explain a flexible way to apply magical spells to units you create. After all, what is an RPG game without enchantments you can cast on your (or enemy's) ...

Inserting Images Into MySQL and Retrieving Them Using PHP

Welcome to another exciting episode! Today we will be discussing a topic that seems to be a bit of a confusing one for everyone... storing BLOB images in MySQL and then showing them again using PHP. While it is always advised against, we will show you a little demo code for how this can be done and discuss why/why not do this. We will then talk a little about the ...

Histogram Equalization Using PHP

The other day someone on the board had asked about histogram equalization and it had sparked some thoughts about how it is applied to picture correction and enhancement. Then of course it hit me like a ton of bricks (ouch!), why not make this into a blog post? So here I am telling all you fine people about using PHP to equalize the histogram information in pictures. Now we all ...

Simple Queue Using Text File in PHP

When talking about any kind of server-side language, like PHP or ASP, you will often find the term "database" not too far behind. It is the preferred choice for storing data on the web after all. Another option is to use a text file. The problem with text files is that they are not typically secure, can be easily read, and don't offer any of the features like referential integrity ...

Book Recommendations For A Variety of Languages

We have a lot of newbies on the forum these days. Again and again we are asked "What are some good books for language _______?" We all have our favorites and some books lean towards a certain learning style. So one programmer is going to like a particular book more than another programmer might. But besides that little glitch in perspective, there are some books that are generally accepted as ...