Papermashup

Latest Posts


Subscribe


Tweets


Papermashup

Web design and development tutorials, scripts and downloads designed for beginners right through to advanced developers


PHP form validation

When building a simple form, validation is usually neglected leaving us open to malicious attacks or genuine user error. filter_var is a built in function to PHP 5 that allows you to strip out any unwanted characters and also makes sure that the data is in the right format i.e. you can check to see if a users email address is in fact a valid [...]

AshleyAshley

Using PHP includes

PHP is a powerful language that has replaced HTML frames and JavaScript includes in performing the task of including code from one page onto another. Generally PHP includes are used for database connection scripts, functions or classes, to be included in dynamic pages. But they can also be used in your static html projects too. This is really [...]

AshleyAshley

Mod rewrite in 10 minutes

Mod rewrite is the best tool to rewrite those long and complicated urls. So what do you need to use mod_rewrite? The only thing you need to get started is make sure that the mod_rewrite module is installed in your Apache server. If your not sure how to find out fear not, copy the code below (make sure you put it between php delimiters) save [...]

AshleyAshley

Jquery Spy

A while ago i spent a long time looking into how Digg made their original spy script, which i can no longer find on their site. They do however have a flash spy which is pretty cool and can be found here. I found a similar script to do the job over at leftlogic.com and used that for a while for a small project of my own, and over the past [...]

AshleyAshley

Creating an iframe with JavaScript

I want to start this post by saying that I’m not a fan of using iframes, however, sometimes due to restrictions within some development environments it may be the only way to embed content into your site of blog. So whats the point i hear you cry. This code is really only useful if your distributing and sharing widgets from your site. [...]

AshleyAshley

Website thumbnails and snapshots

I thought I’d share this great little site for displaying website thumbnails for free and unbranded! http://snapcasa.com/ Move over Websnapr, Snapcasa’s coming through! Websnapr has somewhat dominated the market over the years with their thumbnail generation service as they boast having served over 1 billion thumbnails. However [...]

AshleyAshley

Caching Dynamic PHP pages easily

I’ve been looking for a solution to cache heavy pages and just serve a static html version for a little while now, and I’ve found a solution in output buffering. Things to think about It’s not a good idea to go away and cache your entire site, you need to think about which pages receive high traffic, and which pages make [...]

AshleyAshley

CSS Reset

It’s a good idea at the start of writing your CSS code to reset the CSS across all browsers to ensure that your page renders more or less the same. By default different web browsers use different values for margins, padding, or line heights. A CSS reset script will ensure that most browsers will render your site identically, without [...]

AshleyAshley

Mootools Ajax Example

Here’s a quick example of an ajax request with Mootools. the code below is from sandmoose.com. However I have modified it to get the data using the twitter search api. So the script contains 4 functions, the first function ‘initializeContainer’ makes a new ajax request to our file, in this case ‘twitter.php’. [...]

AshleyAshley