The CSS Box Model

Posted By: Ian on Mar 04, 2014 in CSS, Snippets
Last modified on March 23rd, 2014 at 8:03 pm,

The Box Model Margin Box Border Box Padding Box Element Box All elements are essentially boxes and these boxes enable us to be precise when placing our elements relative to others on our page. REMEMBER! When setting height and width in CSS you MUST take into account the padding, border and margin to get the …

Continue Reading »

Validate URL and Email function using PHP Filters

Posted By: Ian on Mar 01, 2014 in PHP, Snippets

In PHP 5.2 filter functions come installed and enabled by default and today were going to use two of them, one to validate URLs and the other email addresses, replacing the need to use regular expressions like preg_match. For the purpose of this demonstration <?php $email = “”; $url = “”;   function validate($type, $value) …

Continue Reading »

Remote Meta Tag and Title Script

Posted By: Ian on Feb 26, 2014 in PHP, Snippets

Today i share the basics of (Which i own) which is a script for extracting the following from a remote webpage: – Using fopen is only good if it’s enabled in your php.ini else you should probably use CURL <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ""> <html xmlns="" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" …

Continue Reading »

Adding expiry date to database from drop-down list

Posted By: Ian on Feb 25, 2014 in PHP, Snippets

In Banner Bar you set the expiry date from a drop-down list and the issue is that the user has to see one thing and the database another. Before i did it a very long winded way but like most things i try to do on here now “Write Less Do More” so here is …

Continue Reading »

Reusable Drop-down with for loop function

Posted By: Ian on Feb 17, 2014 in PHP, Snippets

I had 5 drop-down lists that all involved numbers that were pulled from a database and originally if i wanted one to go from 1-20 I’d have to write it 20 times! That’s not good coding and takes longer when editing too so now i wrote this which does what i want and might be …

Continue Reading »

Dynamically load Scripts that are self finding

Posted By: Ian on Feb 16, 2014 in JQuery
Last modified on February 17th, 2014 at 6:21 pm,

Q. I’m making a widget and i want the end user to only have to insert 1 line into the webpage and my script to do the rest. A. OK well as a demonstration were going to create a simple widget (Not a true widget but you get the idea) that loads 1 JavaScript, 1 …

Continue Reading »

Ajax link tracker

Posted By: Ian on Feb 15, 2014 in JQuery

Q. How can i record all the external links clicked on my site so i can see where they are when they click on the link, where they came from before and where there going? A. Add the script below to your pages and the information will be sent too count.php for you to manipulate …

Continue Reading »

Get Location of Currently Running Script

Posted By: Ian on Feb 01, 2014 in JavaScript, Snippets

Do you need to get the URL or folder location of the currently executing script? Here’s how i did it! Why would you need to do this? Well if you have a script you distribute which is setup to dynamically load all it’s CSS and other components the location to each of these will need …

Continue Reading »

Add StyleSheet from Drop Down Menu with jQuery and PHP

Posted By: Ian on Nov 19, 2013 in JQuery, PHP, Snippets

Following on from the Snippet add and remove stylesheets with jquery I now show you how to list all the stylesheets from a folder into a drop down menu and append the selected one to the head.     Yea but i don’t want to use a different folder? No problem simply add your folder path …

Continue Reading »

jQuery append, prepend and remove

Posted By: Ian on Nov 10, 2013 in JQuery
Last modified on November 20th, 2013 at 10:45 am,

Simple job list using the jQuery append, prepend and remove methods For the purpose of this demo i describe the methods in how they are used for the job list. append – add new job to the end of the list. prepend – add new job to the beginning of the list. remove – remove …

Continue Reading »

About This Site

Dreams are built from lines of code well it's true!
If you can dream it you can usually code it.

I have learned so much from other people on the Internet and this site is for me to give back some of what i have learned and hope people can now learn from me.
Have fun and surf safely,

protected by copyscape duplicate content check


Powered by Banner Bar 125