Enquiry Email Form

htaccess fun

htaccess- 301 Redirect Old URLs With Spaces

Here’s a quick and easy htaccess 301 redirect tip. So, you have a URL like this: http://www.example.co.uk/this is_a_file.html and you want to redirect it to: http://www.example.co.uk/this_is_a_file.html All you need to…

jQuery Scripts & Helpful Snippets

jQuery- Show The Height And Width Of The Browser Viewport in Real-Time

Strange. I looked around everywhere for this code, and couldn’t find it anymore online. I simply wanted jQuery code that would show the height and width of the browser viewport…

PHP Scripts, Tips & Tricks

PHP- List All Directories/Folders From A Specified Location

This is a quick extension/counterpart to my existing blog post that explains how to List All Files In A Directory in PHP. But instead of listing all files, I’m quickly…

htaccess fun

htaccess- Hide File Extension

I only used this code for the first time last week, but seems to work pretty well. The same code is plastered all over the internet on various websites, so…

MySQL & PHP

MySQL / PHP – Optimize MySQL Tables Script

The MySQL Optimize Table command will effectively de-fragment a mysql table; it’s useful for tables which are frequently updated and/or rows are deleted. Optimizing will will help with overall performance….

Wordpress Tips & Code Snippets

WordPress Excerpt Function Showing CSS #gallery-1

I had the strangest problem earlier. A client had reported that CSS code was showing on a category page, where only excerpts of a post should be showing. This is…

JavaScript

Javascript – Make Div Into A Clickable Link

From what I’m aware, you can’t make a div into a clickable link with just HTML. The only way I’ve ever known is by using Javascript. Open in new window…

PHP Scripts, Tips & Tricks

PHP – Changing Date Format

A friend of mine has been struggling to format a date string he’s pulling out from a MySQL table. He’s just started learning PHP, so he’s still getting to grips…

jQuery Scripts & Helpful Snippets

JQuery – Hover And Show Next Element

So, this JQuery code shows the next element (a DIV in this case) when you hover over a “trigger” (in this case, the triggers are hyperlinks), and then hides the…

CSS Tips & Tricks

CSS- Using Float With List Item Bullets in I.E 6/7

Note to self and everyone else having a breakdown over this issue, YOU CANNOT float a list in I.E 6 or 7 and have the bullets display. It took me…

jQuery Scripts & Helpful Snippets

Ajax- JQuery Hovering/Expanding Info Box

I looked high and low for an “AJAX hovering/expanding info box”, but I couldn’t really find anything decent that worked in all browsers. Most of them choked when using I.E….

Wordpress Tips & Code Snippets

WordPress – Removing Unwanted Header Elements

By default, WordPress tends to load a lot of junk in the header. So, for example, if you “view source” when looking at a wordpress blog post, you’ll typically see…

PHP Scripts, Tips & Tricks

PHP – Creating A Year (date) Loop

Here’s a good/efficient way of building a loop of years from a starting point to an ending point. For example, this code will show you how to print a range…

jQuery Scripts & Helpful Snippets

Ajax JQuery – Rotating Image Script

I can’t remember for the life of me where I got this code from, but if I could, I’d give the author the credit. I didn’t write this code, but…

PHP Scripts, Tips & Tricks

PHP – Capitalize First Letter Of Every Sentence For Proper Formatting

Here’s an extremely useful snippet of code that will properly format sentences with capitalization. Actually, what the code really does is capitialize every letter AFTER a full-stop (period). Here’s an…

MySQL & PHP

PHP / MySQL – Strip Content And Only Display Images From A MySQL Table

This is another one of those quite specific pieces of code, so I doubt many people will need it. I think the code is quite useful, so I thought i’d…

PHP Scripts, Tips & Tricks

PHP – Populate Date Dropdowns – HTML Forms

Ok, i’m going to quickly jot down some PHP code, which dynamically populates date fields (dd/mm/yyyy) for HTML forms. I’m always using this code, but I never write it down,…

JavaScript

Javascript – How To Remove The Trailing Hash In A URL

Ok, this is a quick note to myself, because I always seem to forget this code, and I have no idea why, because it’s so simple. So, the scenario is…

jQuery Scripts & Helpful Snippets

Ajax – Rotating Text

I just implemented a new feature on the Property Investment Project website, which shows a box rotating through various text blocks. Just for clarification, this code doesn’t just apply to…

osCommerce

OsCommerce – SagePay Form Error – 3144: The Delivery information is required

I’ve recently installed Sagepay Form on a clients shopping cart, which is powered by osCommerce Version 2.2. The installation was pretty simple. I had to install the osCommerce SagePay Form…

jQuery Scripts & Helpful Snippets

Ajax JQuery / PHP – Refresh Table When Inserting Row Into a MySQL Database

I’ve had a few people asking me how to refresh a table (not the entire page) when inserting rows into a MySQL database, so I thought I’d quickly put together…

MySQL & PHP

PHP/MySQL- Escape All POST Or GET Variables For MySQL INSERT

I’m quickly going to demonstrate how to escape special characters in a string for all POST/GET variables safe for a MySQL INSERT query when passing values from a HTML form….

MySQL Functions, Tips & Tricks

MySQL – INSERT SELECT Example

I’m quickly going to demonstrate how to INSERT rows from one table into another table. I’d just like to clarify, this isn’t the same as completely copying a table, because…

MySQL Functions, Tips & Tricks

MySQL- Remove Duplicate Rows

I’ve been working with meduim sized tables (2.1million rows) in MySQL lately. One particular table had a lot of duplicate rows, which I needed to filter out. I’m quickly going…

htaccess fun

Htaccess- 301 Redirect An Entire Directory / Folder

Here’s a simple pierce of code which will permanently redirect a folder / directory. For example, if you have a directory in the following path: http://www.example.com/pictures/, and for whatever reason…

PHP Scripts, Tips & Tricks

PHP- Using Preg_replace To Strip Date From URL

This is a very specific problem I was faced with a few days ago, so I doubt many people will find it directly useful. However, the solution to this problem…

SMF- Simple Machines Forum

SMF- Show Page Number In Thread Title

My God, I’ve only just recently started playing around with SM Forums, and I can honestly say the documentation is God awful. At least, it’s terrible compared to WordPress. Also,…

PHP Scripts, Tips & Tricks

PHP- Check If A Number Is Multiple Of Another Number

This is one of those posts that is purely a reminder for myself. It’s something so simple, but for some reason or another, I tend to forget. Suppose I have…

Wordpress Tips & Code Snippets

WordPress- Display Google Adsense After 1st Paragraph Tag

I’ve been playing around with Google Adsense a lot lately- in particular trying to find out where the ads are best placed on a WordPress Blog to maximise click through…

htaccess fun

Htaccess: Prevent People Hotlinking Your Images

Here’s some Htaccess code that will prevent people from hotlinking images hosted on your server. Simply change the domain to yours and then apply the code to your .htaccess. It’s…

Page 2 of 3123

Learning & sharing

This section is dedicated to Web development notes | Page 2 of 3, for both our own uses and for others to learn from. Sharing is caring.

Please feel free to contribute to our blog posts; perhaps even teach us a few tricks of your own. We'd love to hear your thoughts.



X