Archives for the ‘PHP’ Category

Adsense inline your Wordpress Blog posts

By Jamsi • Mar 7th, 2006 • Category: PHP

I stumbled upon this very handy guide on how to insert an adsense ad unit after the first post on your wordpress blog.
To do this you will need to be able to edit the template files, specifically the “index.php” file.
The guide uses a simple PHP if statement to count the number of posts and insert [...]



PHP Dynamic Checkboxes

By Jamsi • Feb 7th, 2006 • Category: PHP

I noticed the lack of tutorials or articles when using checkboxes in a dynamic form, so I thought I’d post some code I used recently to manage deleting rows. The thing most people forget isthat the checkbox field name has to have a [] on the end as this tells PHP to use an array [...]



Form Validation - HTML Tag stripping

By Jamsi • Jan 17th, 2006 • Category: PHP

This short article will talk about protecting your web forms from users who may try to exploit your website by entering in HTML into a text box.
Validation is something all web coders should think about as it protects the end user from making mistakes and protects your website from malicious attacks.
The following code uses the [...]



Squirrelmail error You must be logged in to access this page

By Jamsi • Jan 17th, 2006 • Category: PHP

I came across a problem where squirrelmail kept reporting to me You must be logged in to access this page. I thought it was a cookie problem so I spent ages trying to debug PHP and apache.
The problem was that the server didnt have IMAP installed. Squirrelmail is an IMAP client only.
On debian do the [...]