Quite often I need to look into the database to see if a record exists. For example, to check if a username already exists when creating a new user. I created a simple function to do this for me with mysqli. All I have to do is pass it the table name to look in,
PHP: Using a Registry
Over that last dozen or so projects I have worked on I have noticed that files containing settings, and other site specific data, tend to grow pretty quickly. Each time I open a settings file I struggle with the thought, ‘Do I use a define or a global variable?’. I do not really like using
PHP: Find and manipulate the data between delimiters
I am currently working on a site where the client has a rich text box to enter content for his articles. This is not unusual in itself, however he wants the ability to do some wikiish syntax in the text box and have the system magically produce the output for him. For instance, \[\[ThisIsSomePage\]\] could
PHP: Remove Query String Parameter by Name
There are many times when I have come across situations where I need to remove a parameter from the query string of a URI. Usually these are involved in sorting data from a database, and I want to put a sort_by or some such in the URI as a GET. When the page loads I
MySQL Game
My tech posts have been a bit lacking of late, and though this one isn’t really much of a techy post it is a pretty geeky game. Instead of using a fancy visual interface this game is played through using sql statements. mysqlgame