<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>moreHawes &#187; Web Development</title>
	<atom:link href="http://www.morehawes.co.uk/category/web_development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.morehawes.co.uk</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 17:47:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Add eBay Listings To Your Website In Seconds</title>
		<link>http://www.morehawes.co.uk/add-ebay-listings-to-your-website-in-seconds</link>
		<comments>http://www.morehawes.co.uk/add-ebay-listings-to-your-website-in-seconds#comments</comments>
		<pubDate>Sun, 21 Mar 2010 18:05:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[eBay]]></category>

		<guid isPermaLink="false">http://www.morehawes.co.uk/?p=261</guid>
		<description><![CDATA[If you sell things on eBay then getting your listings seen by as many people as possible can be the difference between selling your item for 99p or £99. Whether you use eBay as an additional outlet for your existing online business or as a way of clearing out your garage &#8211; listing your items [...]]]></description>
			<content:encoded><![CDATA[<p>If you sell things on eBay then getting your listings seen by as many people as possible can be the difference between selling your item for 99p or £99. Whether you use eBay as an additional outlet for your existing online business or as a way of clearing out your garage &#8211; listing your items on your website can be an excellent way of directing visitors of your site to your eBay listings.</p>
<p>Keeping your listings up to date can be a real headache which is why having a listing tool such as <a href="http://www.auctionnudge.com">Auction Nudge</a> that automatically updates and displays your current eBay listings on your website can be a real time saver.</p>
<p>The listings below are generated by pasting one line of code into the HTML of your web page (<strong>Note</strong>: I am not affiliated with this eBay member in any way.) :</p>
<p><script type="text/javascript" src="http://www.auctionnudge.com/0.5/build.php?ebayID=soundswholesale&#038;type=user&#038;site=uk&#038;cols=2&#038;limit=4&#038;theme=4"></script>
<div id="auctionNudge"></div>
<p>This is generated by the following code :</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.auctionnudge.com/0.5/build.php?ebayID=soundswholesale&amp;type=user&amp;site=uk&amp;cols=2&amp;limit=4&amp;theme=4&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;auctionNudge&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>To get Auction Nudge working on your site you can either copy the above code, changing your eBay ID as necessary and pasting it onto your web page or by visiting <a href="http://www.auctionnudge.com/">Auction Nudge</a> to enter your display settings and get your listing code. There is no registration required and you can view a demo of how your listings will look by just entering your eBay username!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.morehawes.co.uk/add-ebay-listings-to-your-website-in-seconds/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Change The Meaning Of &#8216;Free&#8217;</title>
		<link>http://www.morehawes.co.uk/google-change-the-meaning-of-free</link>
		<comments>http://www.morehawes.co.uk/google-change-the-meaning-of-free#comments</comments>
		<pubDate>Wed, 10 Mar 2010 09:36:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dislikes]]></category>
		<category><![CDATA[Search Engine Stuff]]></category>

		<guid isPermaLink="false">http://www.morehawes.co.uk/?p=250</guid>
		<description><![CDATA[I have been promoting one of my other sites recently and when I saw my latest &#8216;Free&#8217; Google AdWords voucher (they&#8217;re not exactly uncommon!) I thought I may as well give it a go. I have never used AdWords before so I went through the sign up process with my voucher in hand. I created [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.morehawes.co.uk/cms/wp-content/uploads/2010/03/google-adwords-free.gif"><img class="alignright size-full wp-image-251" title="google-adwords-free" src="http://www.morehawes.co.uk/cms/wp-content/uploads/2010/03/google-adwords-free.gif" alt="" width="300" height="300" /></a>I have been promoting one of my other sites recently and when I saw my latest &#8216;Free&#8217; Google AdWords voucher (they&#8217;re not exactly uncommon!) I thought I may as well give it a go. I have never used AdWords before so I went through the sign up process with my voucher in hand.</p>
<p>I created my campaign and didn&#8217;t mind the fact that that they wanted billing information before they could activate my account &#8211; but then I noticed that there was a &#8216;activaion fee&#8217; of £5 in my case that I needed to ay in order to activate my account. I took another look at the ad &#8211; yup &#8220;Try it for free &#8211; £50.00* FREE advertising. No risk. No obligation&#8221; and then I looked at the small print &#8211; &#8220;A £5 account activation fee or equivalent credit deduction required&#8221;.</p>
<p>That sounds neither &#8216;Free&#8217; or &#8216;No obligation&#8217; to me.</p>
<p>Perhaps the ad is targeting existing AdWords users where they have already payed their fee? Nope &#8211; &#8220;The promotional code can only be used for AdWords accounts less than 14 days old&#8221;.</p>
<p>It might not have annoyed me if it was aimed at being &#8216;Free&#8217; to existing members who have already paid their fee, but the fact they are targeting new customers with the promise of &#8216;No Obligation&#8217; which is a down right lie. You may think that £5 isn&#8217;t worth getting worked up over &#8211; but I feel this kind of advert is deceiving.</p>
<p>Needless to say I did&#8217;t bother continuing my account creation. So all this advert did was waste my time, annoy me and give me yet another reason to dislike the big G.</p>
<p>Rant over.</p>
<div class="image-container">
<a href="http://www.morehawes.co.uk/cms/wp-content/uploads/2010/03/google-adwords-free-2.jpg"><img class="alignleft size-thumbnail wp-image-254" title="google-adwords-free-2" src="http://www.morehawes.co.uk/cms/wp-content/uploads/2010/03/google-adwords-free-2-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.morehawes.co.uk/cms/wp-content/uploads/2010/03/google-adwords-free-3.jpg"> <img class="alignleft size-thumbnail wp-image-255" title="google-adwords-free-3" src="http://www.morehawes.co.uk/cms/wp-content/uploads/2010/03/google-adwords-free-3-150x150.jpg" alt="" width="150" height="150" /></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.morehawes.co.uk/google-change-the-meaning-of-free/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>moreHawes Through Time</title>
		<link>http://www.morehawes.co.uk/morehawes-through-time</link>
		<comments>http://www.morehawes.co.uk/morehawes-through-time#comments</comments>
		<pubDate>Thu, 04 Feb 2010 19:00:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Me]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.morehawes.co.uk/cms/morehawes-through-time</guid>
		<description><![CDATA[<p>Since I have been working on updating this site recently I thought I would delve into the history books (not really that far back) and look at the previous versions of my website.</p>

<p>Although slightly pointless, I have spent a fair bit of time making these so it's nice to remember.
]]></description>
			<content:encoded><![CDATA[<p>Since I have been working on updating this site recently I thought I would delve into the history books (not really that far back) and look at the previous versions of my website.</p>
<p>Although slightly pointless, I have spent a fair bit of time making these so it&#8217;s nice to remember.<br />
<!--break--></p>
<h3>Version 1</h3>
<p>Between around 2004 &#8211; 2005, I made this site before I even knew what programming really was, but that didn&#8217;t stop me wanting to be a web designer!</p>
<div style="text-align: center; font-size: x-small;"><img style="border: 1px solid black;" src="/images/morehawes_v_1.gif" alt="morehawes version 1" /></div>
<p>The site consisted of a simple 5-page site with a few fancy animated graphics. Still now I like how this site looks.</p>
<h3>Version 2</h3>
<p>Around 2005 &#8211; 2007. I knew a bit of PHP by now and decided that a new site was in order! Re-inventing the wheel slightly I write some scripts for comments, a basic forum and a few other twiddly bits.</p>
<div style="text-align: center; font-size: x-small;"><img style="border: 1px solid black;" src="/images/morehawes_v_2.gif" alt="morehawes version 1" /></div>
<h3>Version 3</h3>
<p>Around 2007 &#8211; 2008. Enter Drupal! I quickly realised the potential of using a content management system, though at this stage I was using it pretty much out of the box.</p>
<div style="text-align: center; font-size: x-small;"><img style="border: 1px solid black;" src="/images/morehawes_v_3.gif" alt="morehawes version 1" /></div>
<h3>Version 4</h3>
<p>2009 &#8211; 2010! Still using Drupal but heavily customised with my own theme. I have organised my content in more of a blog style with all sorts of fancy witchcraft working behind the scenes.</p>
<div style="text-align: center; font-size: x-small;"><img style="border: 1px solid black;" src="/images/morehawes_v_4.gif" alt="morehawes version 1" /></div>
<h3>Version 5</h3>
<p>2010 &#8211; present. Hello WordPress! A complete re-write, re-design and migration to WordPress. Since starting to use WordPress it quickly because my CMS of choice with it&#8217;s long features list and great community support. It&#8217;s a tool that really makes publishing on the web a hassle-free task.</p>
<p><img class="aligncenter size-full wp-image-208" title="morehawes_v_5" src="http://www.morehawes.co.uk/cms/wp-content/uploads/2009/01/morehawes_v_5.jpg" alt="moreHawes meets WordPress!" width="400" height="345" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.morehawes.co.uk/morehawes-through-time/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nochex Steal Your Money</title>
		<link>http://www.morehawes.co.uk/nochex-steal-your-money</link>
		<comments>http://www.morehawes.co.uk/nochex-steal-your-money#comments</comments>
		<pubDate>Tue, 25 Aug 2009 21:57:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Boycotts]]></category>
		<category><![CDATA[Dislikes]]></category>
		<category><![CDATA[Me]]></category>
		<category><![CDATA[Search Engine Stuff]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[osCommerce]]></category>

		<guid isPermaLink="false">http://www.morehawes.co.uk/cms/nochex-steal-your-money</guid>
		<description><![CDATA[<p>For a client recently I had to test osCommerce was accepting Nochex payments. Having never used it before I went through the lengthy and painful process of signing up for a Nochex account.</p>

<p>Well now I know why no one used Nochex. It's rubbish. It's the only thing that would make me recommend Paypal (and I hate Paypal) to anyone but at least their service does what it is supposed to with minimum fuss.</p>]]></description>
			<content:encoded><![CDATA[<p>For a client recently I had to test osCommerce was accepting Nochex payments. Having never used it before I went through the lengthy and painful process of signing up for a Nochex account.</p>
<p>Well now I know why no one used Nochex. It&#8217;s rubbish. It&#8217;s the only thing that would make me recommend Paypal (and I hate Paypal) to anyone but at least their service does what it is supposed to with minimum fuss.</p>
<p>OsCommerce was working fine and accepted my Nochex account but Nochex wouldn&#8217;t accept my address, so I was unable to put a card straight through (as a user without an existing Nochex account might). So I gave up on that as the client offers their own credit card gateway.</p>
<p>So I thought that was that – <strong>but</strong> when you add a credit/debit card to Nochex they debit a &#8216;small&#8217; amount from your card to help with their verification process. They didn&#8217;t go out of their way to tell you this when you register and they certainly don&#8217;t make it clear enough that this is <strong>non-refundable</strong>!</p>
<p>So there I was waiting for my couple of quid to get refunded only to discover it has been stolen. And for what? &#8230; other one for &#8216;the list&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.morehawes.co.uk/nochex-steal-your-money/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Easily Generate Javascript and PHP Error Checking For Your Forms</title>
		<link>http://www.morehawes.co.uk/easily-generate-javascript-and-php-error-checking-your-forms</link>
		<comments>http://www.morehawes.co.uk/easily-generate-javascript-and-php-error-checking-your-forms#comments</comments>
		<pubDate>Fri, 10 Apr 2009 19:17:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javacsript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.morehawes.co.uk/cms/easily-generate-javascript-and-php-error-checking-your-forms</guid>
		<description><![CDATA[<p>I wanted a quick and easy way of adding Javascript and PHP error checking to my form elements. The benefit of this is that errors can be caught using Javascript before the form is submitted, but if JS is disabled in the users browser then the error is still caught using PHP.</p>

<p>The method I came up with to solve this is very simple and can be easily added to form elements with little extra code. The error checking is done by checking input against regular expressions.</p>]]></description>
			<content:encoded><![CDATA[<p>I wanted a quick and easy way of adding Javascript and PHP error checking to my form elements. The benefit of this is that errors can be caught using Javascript before the form is submitted, but if JS is disabled in the users browser then the error is still caught using PHP.</p>
<p>The method I came up with to solve this is very simple and can be easily added to form elements with little extra code. The error checking is done by checking input against regular expressions.</p>
<p>See the <a href="/stuff/error_checking.php">demo</a> and <a href="/stuff/error_checking.txt">demo source code</a>.</p>
<h3>Code Explaination</h3>
<p>One function is used to create both forms of error checking:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$jsChecks</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//holds JS error checks</span>
<span style="color: #000088;">$errorFound</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">//PHP error flag</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Creates both JS and PHP error checks</span>
<span style="color: #000000; font-weight: bold;">function</span> errorCheck<span style="color: #009900;">&#40;</span><span style="color: #000088;">$elementName</span><span style="color: #339933;">,</span> <span style="color: #000088;">$regExp</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errMsg</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$jsChecks</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$errorFound</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">//Create Javascript error checking</span>
	<span style="color: #000088;">$check</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'
	var '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$elementName</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'Filter = '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$regExp</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'; 
	if (!'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$elementName</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'Filter.test(theForm.'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$elementName</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'.value)) { 
		errorMessage += &quot;\n  * '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$errMsg</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;;
		errorFound = true;
	}'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$jsChecks</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$check</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//PHP error checking and return input class</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;formSubmitted&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>	<span style="color: #666666; font-style: italic;">//if form submitted</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$regExp</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$elementName</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$errorFound</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;error&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//css error class</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">//no class if no error detected</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Error checking is created for the form elements specifying which element (by name), a regular expression to be checked against and a custom error message:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Create error checking</span>
<span style="color: #000088;">$nameError</span> <span style="color: #339933;">=</span> errorCheck<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;name&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/([a-z0-9]{3}[a-z0-9]?)/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Name is too short&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">//Must be 3 chars or over</span>
<span style="color: #000088;">$emailError</span> <span style="color: #339933;">=</span> errorCheck<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;email&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/^[a-z0-9]+([_<span style="color: #000099; font-weight: bold;">\\</span>.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+<span style="color: #000099; font-weight: bold;">\\</span>.[a-z]{2,}$/i&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Invalid Email Address&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">//must be valid email address</span></pre></div></div>

<p>If no error is found then process the data.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//If no error found</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$errorFound</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">//Process form data...</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>In our head tags we add the following Javascript and CSS rules. The Javascipt checks we created for each element are included here by the PHP ehco:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
input {
	border: 1px solid #DDD;
}
.error {
	border: 1px dashed #F00;
}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">function validateForm(theForm) {</span>
<span style="color: #808080; font-style: italic;">	var errorFound = false;</span>
<span style="color: #808080; font-style: italic;">	var errorMessage = &quot;Please correct the following errors:\n&quot;;</span>
<span style="color: #808080; font-style: italic;">	&lt;?php echo $jsChecks ?&gt;</span>
<span style="color: #808080; font-style: italic;">	if(errorFound) {</span>
<span style="color: #808080; font-style: italic;">		alert(errorMessage);</span>
<span style="color: #808080; font-style: italic;">	}</span>
<span style="color: #808080; font-style: italic;">	return !errorFound;</span>
<span style="color: #808080; font-style: italic;">}</span>
<span style="color: #808080; font-style: italic;">//--&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>The form is really simple with code to display a CSS class depending on whether a error is detected (for the PHP error checking) and to set the value of the field:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span> <span style="color: #000066;">onSubmit</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;return validateForm(this)&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Name<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span> (must be 3 characters or over)<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo $nameError ?&gt;</span></span>&quot; value=&quot;<span style="color: #009900;">&lt;?php echo @ $_POST<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'name'</span><span style="color: #66cc66;">&#93;</span> ?&gt;</span>&quot; /&gt;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Email Address<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span> (must be a valid email address)<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo $emailError ?&gt;</span></span>&quot; value=&quot;<span style="color: #009900;">&lt;?php echo @ $_POST<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'email'</span><span style="color: #66cc66;">&#93;</span> ?&gt;</span>&quot; /&gt;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;formSubmitted&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;formSubmitted&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Submit&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></div></div>

<p>There you are, both Javascript and PHP error checking! See the complete source code <a href="/stuff/error_checking.txt">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.morehawes.co.uk/easily-generate-javascript-and-php-error-checking-your-forms/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magento Theme / Templating Tutorials, Guides and Resources</title>
		<link>http://www.morehawes.co.uk/magento-theme-templating-tutorials-guides-and-resources</link>
		<comments>http://www.morehawes.co.uk/magento-theme-templating-tutorials-guides-and-resources#comments</comments>
		<pubDate>Mon, 09 Feb 2009 20:46:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[e-commerce]]></category>

		<guid isPermaLink="false">http://www.morehawes.co.uk/cms/magento-theme-templating-tutorials-guides-and-resources</guid>
		<description><![CDATA[<p>I think anyone that has worked with <a href="http://www.magentocommerce.com">Magento</a> will agree that it is a steep learning curve, this is not helped by the lack of documentation. I have put together a list of useful links when that I found helpful whilst trying to get my head around Magento themes:</p>

<p>(I have expanded upon <a href="http://maff.ailoo.net/2008/09/magento-design-resources/">these</a>&#160;<a href="http://stevelam.ca/news/theming-magento-commerce">lists</a> which I found useful)</p>]]></description>
			<content:encoded><![CDATA[<p>I think anyone that has worked with <a href="http://www.magentocommerce.com">Magento</a> will agree that it is a steep learning curve, this is not helped by the lack of documentation. I have put together a list of useful links when that I found helpful whilst trying to get my head around Magento themes:</p>
<p>(I have expanded upon <a href="http://maff.ailoo.net/2008/09/magento-design-resources/">these</a> <a href="http://stevelam.ca/news/theming-magento-commerce">lists</a> which I found useful)</p>
<ul>
<li><a href="http://www.amazon.co.uk/gp/product/0973862173?ie=UTF8&amp;tag=morehawes-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0973862173">Php|architect&#8217;s Guide to E-Commerce Programming with Magento</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=morehawes-21&amp;l=as2&amp;o=2&amp;a=0973862173" border="0" alt="" width="1" height="1" /></li>
<li><a href="http://www.magentocommerce.com/design_guide">Designer&#8217;s Guide to Magento</a> &#8211; The most solid of Magento&#8217;s documentation, though it might take a few reads before things become clear! (<a href="http://inchoo.net/wp-content/uploads/2008/06/designers_guide_to_magento.pdf">pdf version</a>)</li>
<li><a href="http://www.magentocommerce.com/support/magento_core_api">The Magento API</a></li>
<li><a href="http://www.magentocommerce.com/media/screencasts">Magento Screencasts</a></li>
<li><a href="http://www.magentocommerce.com/blog/comments/designing-for-magento-webinar-recording-now-available/">Designing for Magento Webinar</a> &#8211; worth watching the wmv file as much better quality</li>
<li><a href="http://www.magentocommerce.com/wiki/how-to/designing/designing-for-magento">Magento Wiki</a> &#8211; out dated but some handy concepts</li>
<li><a href="http://www.magentocommerce.com/boards/viewthread/1438/#t6703">Ohminu forum post</a> &#8211; the lead designer breaks things down for newbies</li>
<li><a href="http://www.magentocommerce.com/wiki/general/magento-folder-structure">Magento Folder Structure</a></li>
<li><a href="http://www.magentocommerce.com/boards/viewthread/2869/">Changing Text</a> &#8211; using the Locale File</li>
<li><a href="http://www.magentocommerce.com/boards/viewthread/1438/#t6703">Builing Blocks</a> &#8211; more handy hints from the lead designer</li>
<li><a href="http://www.magentocommerce.com/media/screencasts/designers-guide-1/view">Screencast on creating themes</a> &#8211; a very <strong>brief</strong> introduction to creating a new theme</li>
<li><a href="http://www.phparch.com/training/slides/MAGDEV0708/recordings/">Video&#8217;s and other resources</a> from php | architect</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.morehawes.co.uk/magento-theme-templating-tutorials-guides-and-resources/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
