CodeIgniter Documentation News Tutorial Follow-on – Adding the Ability to Edit

The official CodeIgniter documentation contains a useful tutorial on how to use CodeIgniter to create a news section on a website. Unfortunately the tutorial only shows you how to list news, view individual news posts and create new news posts. In this tutorial I will be showing how to extend this code to include the ability to edit news. I’m assuming you are using CodeIgniter 2.1 and have followed the tutorials for static pages, news section and create news items.

Model – news_model.php

Updates to the news model are pretty straight forward, we take the set_news() method and duplicate it. We need to know which article is being edited so we pass through the ID. This is then used with the CI database class to add a WHERE clause to the SQL before sending the UPDATE query to the database.

read more »

Getting Started with Augmented Reality

Augmented Reality (AR) is taking over were virtual reality has been failing over the years – except this time it’s different. The biggest failing with virtual reality is the simple fact that it is too discontented from, well, reality. Step in augmented reality. Augmented reality is already breaking through in to mainstream society and has been for a few years; star viewing apps, Layar and Wikitude are all extremely popular on various smart phone platforms.

An ever increasing presence of smart phones in consumers’ pockets and a slow realisation from marketing departments that using technology to advertise and enhance the customer experience is a good thing is opening the gates for all sorts of ideas and innovations. As a tech-savvy consumer you can now order and pay for your pizza at the table or walk in to a store and get instantly notified of the latest offers.

read more »

Common Logic Checks in PHP from a Classic ASP Perspective

Ask anyone who has ever written code in different languages and they will tell you; once you’ve learnt one language you’ve learnt them all. That’s not to say learning one makes you fluent in all – far from it, even the most similar of languages have different enough to cause headaches – but for each programming language you learn, the next becomes easier. This is because at the heart of every language are two basic functions; logic checks and loops.

In this post I will be covering how to get your head around the most common logic checks in PHP when moving from a Classic ASP background – something that I have done recently. First on the agenda is the most basic of logic checks – the IF statement, which in plain English translates to if this statement is true, do this, otherwise do this.
read more »

How to Improve your Hotel Website Site by Exactly 100 Percent

Given the current economical climate a lot of hotel chains and family run hotels are suffering as people are pinching the pennies and are less likely to go away for a nice weekend break on impulse. An easy and cheap way to improve your site view to booking ratio is to make sure you not only maintain your website but also strive to continually improve it and engage your site visitors with easy to find information and clear, up to date, hotel photography.

Here is a list of pitfalls that I have seen a lot of hotel sites fall in to over the last few months planning my honeymoon.

No pricing information on your website

“We don’t want our tariffs on our site just in case the price puts people off booking”

Wait, what? The lack of pricing information on your website is precisely what puts people off booking – people like to make shortlists and notes about where they are going to stay, not providing them with such basic information as how much it is going to cost to stay is like owning a car garage and not putting the price of the cars in their windows on the forecourt.

read more »