Call us on 01494 372047 Client Login

Let's (not) make some forms

> View all blog entries

Published | 16.15, 23rd of January 2009, by Jay Vincent | Technical

One of the most unenjoyable tasks I often have to undertake is the creation of forms - simple web-to-email forms. Therefore, I've decided to create a little wizard-like application to allow non-webbies to create them, so I don't have to. A few points to consider for anyone doing this are as follows:

  1. The PHP page which will process the form will need to be generic, and able to handle any input type thrown at it - a checkbox group is read as an array, where as radio button values are simply strings.
  2. The PHP proccessing page will need to recognise which fields are marked as required fields.
  3. If required fields are left blank, the PHP processing page will need to send the user back to the form, with values the user has already inputted preserved.
  4. Inputted values will run through a PHP regular expressions function which will allow only white-listed characters. This security measure will prevent form hi-jacking.
  5. The PHP processing page will need to verify it is receiving data from its own website. This is done by checking the $_SERVER['HTTP_REFERER'] variable.
  6. The recipients email address will be cross-referenced in a database table by a unique ID. This ID is what will be specified on the form page. This security measure means a hacker can't alter the recipient email address.
  7. The form will need to specify a redirect page the user will be sent to upon successful submission.

The creation of the form itself will be wizard-like - WYSIWYG almost, with the user specifying which type of input, its possible values, required fields, etc. Each form and its contents will be stored in a mySQL database table.

This will be a fun little mini-project for me to work on, and when its done it will either be attached onto Arena (our custom CMS) and/or sold here on our website!

No comments | Make a comment (Average rating | 4.33 / 5)

Post a comment

Your name *
Your email *
(will not be published)
Your comment *

Blog Entries

Blog Topics

Business (8)
Design (18)
Random (14)
SEO (9)
Technical (11)





Featured Case Studies

now! microsite for Beadle & Crome

now! microsite for Beadle & Crome

A microsite showcasing specialist hulsta furniture for retailer, Beadle and Crome.

> View case study

Invest in Bucks

Invest in Bucks

A council-backed inward investment website for Buckinghamshire, by the Bucks Economic & Learning Partnership.

> View case study



Requiring cost effective solutions to charity brand for publicity materials and ongoing marketing.

> View case study


Share this page

If you found this page useful, perhaps you'd like to bookmark it or share it with the world!

FavouritesAdd to Favourites EmailEmail page to a friend

DiggitDigg it FacebookFacebook MyspaceMySpace GoogleGoogle

Latest News RSS Feed

> We have moved!

Published | 20th of January 2011

> Bringing you up to date.

Published | 29th of November 2010

> Artlines achieves RAR Agency status

Published | 1st of September 2010

Artlines Media a full service creative design agency based in High Wycombe.

We specialise in branding & identity design, website design, development & production, e-commerce, content management systems, search engine optimisation, print design and email marketing campaigns.

Get in touch

From exciting start-ups to corporate brands, our team is always eager to work on the best projects with the best clients.

Artlines Media Ltd
6 Regius Court
Church Road
High Wycombe
HP10 8RL

Telephone: 01494 372047
Fax: 01494 980243