Browser image caching was causing me a problem today.
When a user of a client site uploads a profile image, it intentionally overwrites the old image. However, when viewing the profile page, the old image is shown unless you refresh the page.
Preventing browser image caching
The solution was quite simple. In order to force the browser to [...]
Multidimensional arrays are arrays which contain arrays and each of those may also contain arrays. There is no limit to the number or level of sub-arrays.
Recursive functions are functions which call themselves. They are particularly useful when working with multi-dimensional arrays. However, using recursive functions should be avoided if the function is likely to be called over 200 times, as it may kill the script.
Here is a very basic example of how one could use a recursive function in PHP:
<?php
# [...]
CodeIgniter – created by EllisLabs and first released in 2006, CodeIgniter is a freely available MVC web application framework used for developing websites using PHP.
CodeIgniter ships with a large library commonly used OOP classes, enabling the developer to call them rather that using time creating her own. When compared to other similar MVC frameworks, [...]
No doubt you already use a database connection script. As a developer, you probably use different servers throughout the development process. When you move your application from one server to another, you maybe have to change the database connection script in order for the application to work on the new server.
If you forget to update [...]
Tagged connect, connection, database, development, MySQL, php, server, servers, sql
Over the passed few months, I have received numerous comments from people, on the same course as me, to the effect that they wished I would teach them PHP.
I have decided to call their bluff and offer to run classes during the summer. Well, I have been surprised by the overwhelming response and have set [...]
Tagged class, classes, contact, course, lessons, php
A couple of weeks ago I took a PHP exam as part of my university course. Results came out last week and I was pleased to be awarded 82% – top of the class!
This is all very good and something to be happy with, but, would it be recognized by industry?
Certification
I guess the best thing [...]
Tagged certification, course, domino, exam, exams, lotus, php, University
If you need to use message-digest algorithm 5 (md5) to encrypt words or phrases, please feel free to use this tool I created for my own use:
Free MD5 encryption tool
Tagged algorithom, code, encrypt, encryption, generator, md5, php, tool
Last week I was looking at a way to make certain areas of a website accessible only via login using username and Password. Virtually everywhere I looked suggested setting up a separate MySQL database with a table containing the user details, and a separate mysqlconnect document. Without a doubt, this would work, but it’s a [...]
Tagged agent, encryption, http, HTTP_USER_AGENT, in, log, login, md5, MySQL, password, php, secure, session ID, session_start(), user, username
Ok. I’m going to try to KISS this article.
I realised that I needed to change the URL’s on my website. They were similar to this:
www.domain.co.uk/genericpage.php?pagename
This method allows for a degree of dynamism. It allows for just one page to display all the content. Everything after the ‘?’ are arguments with which my script selects content [...]
Tagged .htaccess, Apache, dynamic, dynamism, engine, mod_rewrite, php, redirect, rewrite, RewriteEngine, search, seo, URL