<?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"
	>

<channel>
	<title>Pryde Design</title>
	<atom:link href="http://www.pryde-design.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://pryde-design.co.uk/blog</link>
	<description>The path to internet enlightenment</description>
	<pubDate>Thu, 15 May 2008 16:23:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Ant Buster &#124; AntBuster - Edited Version</title>
		<link>http://pryde-design.co.uk/blog/2008/05/13/ant-buster-antbuster/</link>
		<comments>http://pryde-design.co.uk/blog/2008/05/13/ant-buster-antbuster/#comments</comments>
		<pubDate>Tue, 13 May 2008 15:30:30 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://pryde-design.co.uk/blog/?p=30</guid>
		<description><![CDATA[I have been playing Ant Buster / AntBuster to pass the time for a few minutes just now and then I found an edited / hacked version that makes it a little bit more crazy and ups the tempo a little. Here it is anyway.
Protect your picnic from ants that are trying to steal your [...]]]></description>
			<content:encoded><![CDATA[<p>I have been playing <strong>Ant Buster</strong> / <strong>AntBuster</strong> to pass the time for a few minutes just now and then I found an edited / hacked version that makes it a little bit more crazy and ups the tempo a little. Here it is anyway.</p>
<p><em>Protect your picnic from ants that are trying to steal your pie. The funny about this game is that you can&#8217;t maze the ants, but you still can place your towers almost everywhere on the map.</em></p>

<object	type="application/x-shockwave-flash"
			data="http://pryde-design.co.uk/blog/wp-content/uploads/2008/05/ant11edit.swf"
			width="500"
			height="500">
	<param name="movie" value="http://pryde-design.co.uk/blog/wp-content/uploads/2008/05/ant11edit.swf" />
</object>
<p>There you go</p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/05/13/ant-buster-antbuster/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Podcasting with Audacity</title>
		<link>http://pryde-design.co.uk/blog/2008/05/12/podcasting-with-audacity/</link>
		<comments>http://pryde-design.co.uk/blog/2008/05/12/podcasting-with-audacity/#comments</comments>
		<pubDate>Mon, 12 May 2008 05:41:10 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Audio]]></category>

		<guid isPermaLink="false">http://pryde-design.co.uk/blog/?p=27</guid>
		<description><![CDATA[
Today A couple of old friends approached me asking how to set up a podcast.  This is basically what I told them!
Firstly Some software:
Now there are many pieces of software for capturing and editing audio but by far the best open source program out there in my opinion is Audacity which can be downloaded [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-28" style="vertical-align: text-top;" title="audacity" src="http://pryde-design.co.uk/blog/wp-content/uploads/2008/05/audacity.jpg" alt="" width="270" height="216" /></p>
<p>Today A couple of old friends approached me asking how to set up a podcast.  This is basically what I told them!</p>
<p><strong>Firstly Some software:</strong></p>
<p>Now there are many pieces of software for capturing and editing audio but by far the best open source program out there in my opinion is Audacity which can be downloaded <a href="http://audacity.sourceforge.net/" target="_blank">here</a> for free.  It has many great functions including some useful audio effects and functions but above all else it is very simple to use. There are many applications out there that it take hours of practice and reading to create the same sort of results as I have seen with this program. Of course it is not as powerful as applications like Adobe Audition 3 so you can expect some limitations but lets face it you are trying to create a pod cast not an audio masterpiece so  Adobe Audition 3 would be like swatting a fly with a nuke.</p>
<p><strong>Now for some Hardware:</strong></p>
<p>I have a Logitech Internet Chat Headset which is not a great microphone but serves its purpose for me. Also as it would be slightly boring listening to someone talk to them self I got out an old lapel clip mic that I got a while back with a webcam for my mate.</p>
<p>Now to set the mics up. This next part will depend on what sound card you have so don&#8217;t complain if it doesn&#8217;t work, you most probably have a different card! My card is made by RealTek and I have the RealTek HD Audio Manager set up.</p>
<p>I need to set the RealTek HD Audio Manager to see both my mics and then I need to set Audacity to receive both mics simultaneously.</p>
<p><a rel="lightbox" href="http://img375.imageshack.us/img375/5885/52220542te1.png"><img style="vertical-align: text-top;" src="http://img404.imageshack.us/img404/6654/56021137zf7.png" alt="" width="150" height="115" /></a></p>
<p>As you can see I have three jacks set up to take input. Now two of the jacks are labeled on my PC casing as microphone jacks but the other is a headphone jack. This is were the RealTek HD Audio Manager and the sound card come into their own. It makes no difference which jack you use, they can all be setup to do a number of input/output functions.</p>
<p>I&#8217;ll be looking for your comments on your specific sound cards as I know that the card on my laptop does not support this so many older cards may not. If you are unable to do this you are going to need to get a multi audio jack input device or use a couple of USB mics its up to you.</p>
<p><strong>Back to the software:</strong></p>
<p>Now we need go back to Audacity and test out the setup. If it worked the defaults in Audacity are working if not you need to go to edit -&gt; Preferences and then check that Microsoft Sound mapper is selected under Audio I/O.</p>
<p>There you go just hit record and you are away!</p>
<p><strong>Getting it out there:</strong></p>
<p>Now you have an MP3 file that you are happy with you are going to want to get it out there. Its a bit boring if you are the only one that listens to it don&#8217;t you think. You mean although we don&#8217;t like to admit it we are all a little vain and like to know people are listening to what we have recorded.</p>
<p>I suggest you use wordpress to get your podcast out there. I suggest this becuase there is a very good plugin called podPress which automatically sets up an iTunes RSS feed which is normally the chosen method of delivery for most podcasts. Not only this it also is a great platform for interacting with your listeners and allows you to create a good looking site with no technical expertise.</p>
<p>If you don&#8217;t have hosting or a domain I suggest you get an account on one of the free podcasting services which use wordpress with the plugin.</p>
<p>Now we need to get the iTunes RSS setup the plugin makes this very simple giving you a preview of what to expect to see on iTunes.</p>
<p><a rel="lightbox" href="http://img339.imageshack.us/img339/8880/82227465bg8.png"><img style="vertical-align: text-top;" src="http://img339.imageshack.us/img339/5603/55005955hu8.png" alt="" /></a></p>
<p>Take a look through all of the settings and set them to the apropriate values for your feed then just save the changes. Then upload your podcast using wordpress and make sure that the path you used is the one set in the podPress General settings tab and away you go. Give iTunes a few minutes to update and then go check out your podcast!</p>
<p>I hope this has helped. I am looking forward to your comments and questions so get them rolling in.</p>
<p>Thanks</p>
<p>Andrew</p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/05/12/podcasting-with-audacity/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Update #2</title>
		<link>http://pryde-design.co.uk/blog/2008/04/29/update-2/</link>
		<comments>http://pryde-design.co.uk/blog/2008/04/29/update-2/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 20:09:34 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://pryde-design.co.uk/blog/?p=26</guid>
		<description><![CDATA[Hi guys, firstly I must apologize for not posting in a few days but I hope you will forgive me because I have not exactly been resting.
The story begins on Friday afternoon, I get back and am expecting my nice new computer to be delivered at five. I open up my mail box and check [...]]]></description>
			<content:encoded><![CDATA[<p>Hi guys, firstly I must apologize for not posting in a few days but I hope you will forgive me because I have not exactly been resting.</p>
<p>The story begins on Friday afternoon, I get back and am expecting my nice new computer to be delivered at five. I open up my mail box and check the post. What do I find? Guess what a &#8220;We tried to deliver&#8221; slip. Now thats interesting the £16 I spent getting it delivered between 5 - 8pm has been slightly wasted I thought. So I got onto the company that were delivering it and said wait a minute here I payed £16 to have it delivered when I wanted it delivered. They then informed me that they could not deliver it in that time and that it would be redelivered between 9 - 5 on Monday. They also explained that PC world had not payed them to deliver the PC at the time I had asked for. So I was straight on the phone to PC world they did brighten up my day saying I could have a refund which was nice but that I should go and pick the machine up. At this point I had already realized my night out was already down the drain but it was still annoying to be told you have to make a 40 mile round trip when there was a great night out on the cards. Anyway I got the machine and found that they keyboard was American and the wireless mouse came with a pre-attached PS2 cable (funky addition ehh!). I overlooked this as I was knackered and just plugged the thing in to see that it would work.</p>
<p>After the evenings antics I decided to get some sleep and leave the rest till the next day so I went and got 40 winks. Waking up on a new day I decided to get on with installing XP over the defult Vista installation. People may not agree with me but vista is terrible. Visually yes its nice but when you are trying to run a business you don&#8217;t neither want nor need these time wasting and memory hogging affects.</p>
<p>Anyway it was a horrible day of messing with drivers and installations. I still have not got the hard drive back into SATA AHCI mode yet as I can&#8217;t for the life of me find a guide and driver for it but never mind about that.</p>
<p>I then decide to start on a project doing video editing for a school production of South Pacific. This was supposed to be easy and fairly relaxing for the Sunday but no. Sony has the audacity to produce a camera that outputs mpg&#8217;s when its editing software (Sony Vegas 8 Pro) does not support it. Have you ever tried to find a converter that converts over 5 gigs of mpg&#8217;s to avis in DVD quality. Well if not I&#8217;m telling you its not easy! I am just finishing the project now a full 48 hours later than expected for goodness sake!</p>
<p>Anyway thats my feeble excuse for not posting anything and thats another long post that has no real merit for you to read lol!</p>
<p>Also I would like some feedback from you guys. What should I be posting about? what should I be doing? If you don&#8217;t tell me it wont be what you want to read / learn so please do. Just drop me a comment or send me an E-mail.</p>
<p>Thanks</p>
<p>Andrew</p>
<p>P.s - I also formally apologise for the Clinton / Obama post that was posted here. I must stress that I did not write it and that It was not my opinion. It was just link bate written by a writer from a freelance agency for the purpose of controversial link bating. This back fired getting people upset that I really didn&#8217;t want or need to be upset so I&#8217;m sincerely  sorry.</p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/04/29/update-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blog Moved and Skin changed</title>
		<link>http://pryde-design.co.uk/blog/2008/04/21/blog-moved-and-skin-changed/</link>
		<comments>http://pryde-design.co.uk/blog/2008/04/21/blog-moved-and-skin-changed/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 21:08:12 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://pryde-design.co.uk/blog/?p=22</guid>
		<description><![CDATA[Hey guys,
I have moved the blog  from blog.pryde-design.co.uk to pryde-design.co.uk/blog for SEO purposes. This now means that the page rank of pryde design should rise quicker than we were seeing in the past month and that we should be receiving more traffic so that has to be good ehh!
I also took the opportunity to redo [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys,<br />
I have moved the blog  from blog.pryde-design.co.uk to pryde-design.co.uk/blog for SEO purposes. This now means that the page rank of pryde design should rise quicker than we were seeing in the past month and that we should be receiving more traffic so that has to be good ehh!</p>
<p>I also took the opportunity to redo the look and feel of the blog. I am open to any suggestions but I have already heavily modified the skin to take pryde-designs unique ethos into account.</p>
<p>Thanks allot for your continued support,</p>
<p>Remember to link to us and tell your friends</p>
<p>Andrew</p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/04/21/blog-moved-and-skin-changed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free Search Engine Optimization</title>
		<link>http://pryde-design.co.uk/blog/2008/04/19/free-search-engine-optimization/</link>
		<comments>http://pryde-design.co.uk/blog/2008/04/19/free-search-engine-optimization/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 20:15:36 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.pryde-design.co.uk/?p=21</guid>
		<description><![CDATA[I am starting to offer a new free service were I analyze your website for FREE! Yes FREE, I&#8217;ll say it again FREE. The service entails first you adding a link to www.pryde-design.co.uk to the front page of your site and then E-mailing me the url to your site. I will then endever to analyze [...]]]></description>
			<content:encoded><![CDATA[<p>I am starting to offer a new free service were I analyze your website for FREE! Yes FREE, I&#8217;ll say it again <strong>FREE</strong>. The service entails first you adding a link to <a href="http://www.pryde-design.co.uk" target="_blank">www.pryde-design.co.uk</a> to the front page of your site and then E-mailing me the url to your site. I will then endever to analyze the site within the next few days. I cannot guarantee to analyze your site in this time as this is a free service but I will make every effort to do so.</p>
<p>I hope this service will help you guys</p>
<p>Thanks</p>
<p>Andrew</p>
<p><code><p>Technorati Tags: <a href="http://technorati.com/tag/SEO" rel="tag">SEO</a>, <a href="http://technorati.com/tag/Free+SEO" rel="tag"> Free SEO</a>, <a href="http://technorati.com/tag/Search+Engine+Optimization" rel="tag"> Search Engine Optimization</a>, <a href="http://technorati.com/tag/Free+Search+Optimization%3C%2Fcode%3E%3Ccode%3E" rel="tag"> Free Search Optimization</code><code></a></p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/04/19/free-search-engine-optimization/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Update #1</title>
		<link>http://pryde-design.co.uk/blog/2008/04/18/update-1/</link>
		<comments>http://pryde-design.co.uk/blog/2008/04/18/update-1/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 14:28:01 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.pryde-design.co.uk/?p=20</guid>
		<description><![CDATA[I have not written to the blog for a while now as I have been on holiday so I thought I would write a small update to let you guys know how I am doing.
I am now back and things are going swimmingly I have picked up a couple of contracts on my travels and [...]]]></description>
			<content:encoded><![CDATA[<p>I have not written to the blog for a while now as I have been on holiday so I thought I would write a small update to let you guys know how I am doing.</p>
<p>I am now back and things are going swimmingly I have picked up a couple of contracts on my travels and had and interesting commission from a client I have been working with for a while now. Also I have been thinking about getting a new computer for a while now. As mine has an old celeron M processor in it which although it is overclocked does not utilise multi core technology this coupled with the low amount of RAM and the fact that it runs like a small volcano heat wise have all contributed to my decision.</p>
<p>The new computer I have chosen can bee seen <a href="http://www.pcworld.co.uk/martprd/product/seo/725229" target="_blank">here</a></p>
<p>Its main specs are:</p>
<ul>
<li>Intel Core 2 QUAD Processor Q6600</li>
<li>2.4GHz, 1066MHz FSB, 8MB Cache</li>
<li>Windows Vista (R) Home Premium</li>
<li>3GB Memory</li>
<li>250GB Hard Drive</li>
<li>Dual Layer DVD Rewriter</li>
<li>NVIDIA GeForce 8400</li>
<li>6 USB connections</li>
<li>2 PCI Slots</li>
<li>1 No. of Firewire Connections</li>
</ul>
<p>I was wondering if any of you guys know of any machines with the same specs (especial processor) for less or slightly more but including a monitor. The monitor is not essential but I would like a nice flatscrean rather than my chunky old thing.</p>
<p>In other news I&#8217;d like you guys to check out <a href="http://a1aerials.tv" target="_blank">http://a1aerials.tv</a> and comment on it. Its the same layout as pryde-design but I changed the colours and made a logo.</p>
<p>Anyway I must get on.</p>
<p>For those who are interested I will be realeasing version 0.3 of the login script and a brand new news script on the blog in the coming weeks so remember to check back.</p>
<p>- Andrew</p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/04/18/update-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>XSS Vuln in PHP_SELF Video</title>
		<link>http://pryde-design.co.uk/blog/2008/03/30/xss-vuln-in-php_self-video/</link>
		<comments>http://pryde-design.co.uk/blog/2008/03/30/xss-vuln-in-php_self-video/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 10:01:31 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.pryde-design.co.uk/?p=19</guid>
		<description><![CDATA[I have made a video about the XSS vunrablitiy in PHP_SELF so that it is easier explained to coders just begining to use PHP and that have little background in security.
Anyway here it is&#8230; hope you like it&#8230;
XSS Hole in PHP_SELF
- Andrew
]]></description>
			<content:encoded><![CDATA[<p>I have made a video about the XSS vunrablitiy in PHP_SELF so that it is easier explained to coders just begining to use PHP and that have little background in security.</p>
<p>Anyway here it is&#8230; hope you like it&#8230;</p>
<p><a href="http://youtube.com/watch?v=yxWIvI4TNMs" target="_blank">XSS Hole in PHP_SELF</a></p>
<p>- Andrew</p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/03/30/xss-vuln-in-php_self-video/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WOTM: Webforumz</title>
		<link>http://pryde-design.co.uk/blog/2008/03/28/wotm-webforumz/</link>
		<comments>http://pryde-design.co.uk/blog/2008/03/28/wotm-webforumz/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 07:07:15 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.pryde-design.co.uk/2008/03/28/wotm-webforumz/</guid>
		<description><![CDATA[Pryde Design Has been entered into website of the month in webforumz. I would really like to win as It would be such an honor.  If you  guys could vote for me it would be brilliant as I am not doing so well at the moment!
So please click here to vote for me!
Thanks [...]]]></description>
			<content:encoded><![CDATA[<p>Pryde Design Has been entered into website of the month in webforumz. I would really like to win as It would be such an honor.  If you  guys could vote for me it would be brilliant as I am not doing so well at the moment!</p>
<p>So please click <a href="http://www.webforumz.com/entry-nominations-and-voting/66406-wotm-april-award-voting.htm" target="_blank">here</a> to vote for me!</p>
<p>Thanks allot</p>
<p>- Andrew</p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/03/28/wotm-webforumz/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Advanced Mysql / PHP database backed login script</title>
		<link>http://pryde-design.co.uk/blog/2008/03/27/advanced-mysql-php-database-backed-login-script/</link>
		<comments>http://pryde-design.co.uk/blog/2008/03/27/advanced-mysql-php-database-backed-login-script/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 22:10:50 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.pryde-design.co.uk/2008/03/27/advanced-mysql-php-database-backed-login-script/</guid>
		<description><![CDATA[
I have conformed to popular request and adapted the login script to use a database (mysql) backend to store the passwords. I have also implemented md5 encryption but I have not yet added member registration you can look for that in version 1.3 along with privileges for admins and members + the use of cookies [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-34" style="vertical-align: text-top;" title="php-login-script1" src="http://pryde-design.co.uk/blog/wp-content/uploads/2008/05/php-login-script1.jpg" alt="" width="270" height="216" /></p>
<p>I have conformed to popular request and adapted the login script to use a database (mysql) backend to store the passwords. I have also implemented md5 encryption but I have not yet added member registration you can look for that in version 1.3 along with privileges for admins and members + the use of cookies for a &#8220;Remember me&#8221; function.</p>
<p>Anyway heres the code.</p>

<div class="wp_syntax"><div class="code"><pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #808080; font-style: italic;">/*
--&gt; Simple PHP login script
--&gt; By Andrew Pryde
--&gt; http://www.pryde-design.co.uk
*/</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// EDIT VARS</span>
<span style="color: #ff0000">$username</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$password</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #808080; font-style: italic;">// STOP EDIT</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// start a session (needed for detecting if the user is logged in or not)</span>
<span style="color: #000066;">session_start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// function to login the user or tell them that the username // pass is incorrect</span>
<span style="color: #000000; font-weight: bold;">function</span> login <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$user</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$pass</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">global</span> <span style="color: #ff0000">$username</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$password</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$user</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000">$username</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$pass</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000">$password</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #ff0000">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'LOGGED_IN'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;The password and or Username were incorrect&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// function to print the html login form</span>
<span style="color: #000000; font-weight: bold;">function</span> print_form <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #ff0000">$form</span> <span style="color: #66cc66;">=</span><span style="color: #ff0000;">'&lt;form action=&quot;'</span><span style="color: #66cc66;">.</span><span style="color: #000066;">htmlentities</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_SERVER</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'PHP_SELF'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&quot; method=&quot;post&quot;&gt;'</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$form</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">'Username:&lt;input name=&quot;user&quot; type=&quot;text&quot; /&gt;Password:&lt;input type=&quot;password&quot; name=&quot;pass&quot;&gt;'</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$form</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">'&lt;input name=&quot;Submit&quot; type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;&lt;/form&gt;'</span><span style="color: #66cc66;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000">$form</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'LOGGED_IN'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #000066;">empty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_GET</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'logout'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Members area....&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://pryde-design.co.uk/blog/wp-admin/<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Logout&lt;/a&gt;&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">elseif</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066;">isset</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'user'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #000066;">isset</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'pass'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
login <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'user'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'pass'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'LOGGED_IN'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Members area....&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://pryde-design.co.uk/blog/wp-admin/<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Logout&lt;/a&gt;&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">elseif</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'LOGGED_IN'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_GET</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'logout'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;yes&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">session_destroy</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;You have been logged out... &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://pryde-design.co.uk/blog/wp-admin/<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Login&lt;/a&gt;&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #66cc66;">&#123;</span>
print_form<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>As usual my code has been commented so you should be able to understand it. If you have any problems then you can comment bellow or email me.</p>
<p>Thanks for reading and make sure you check back for the updated version (subscribing helps you do so any makes me happy why not there is a nice button up there press it! :P)</p>
<p>Anyway</p>
<p>Hope you like it&#8230;</p>
<p>- Andrew<img class="alignnone size-medium wp-image-34" title="php-login-script1" src="http://pryde-design.co.uk/blog/wp-content/uploads/2008/05/php-login-script1.jpg" alt="" width="270" height="216" /></p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/03/27/advanced-mysql-php-database-backed-login-script/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Login Script / form</title>
		<link>http://pryde-design.co.uk/blog/2008/03/26/php-login-script-form/</link>
		<comments>http://pryde-design.co.uk/blog/2008/03/26/php-login-script-form/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 22:23:19 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.pryde-design.co.uk/2008/03/26/php-login-script-form/</guid>
		<description><![CDATA[
Today I have coded a php login script for you guys to have a look at. It is in its most basic form only using variables stored in the script as verification of the users identity but you could adapt it easily for use with a database.

&#160;
&#60;?php 
/*
--&#62; Simple PHP login script
--&#62; By Andrew Pryde
--&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-33" style="vertical-align: text-top;" title="php-login-script" src="http://pryde-design.co.uk/blog/wp-content/uploads/2008/05/php-login-script.jpg" alt="" width="270" height="216" /></p>
<p>Today I have coded a php login script for you guys to have a look at. It is in its most basic form only using variables stored in the script as verification of the users identity but you could adapt it easily for use with a database.</p>

<div class="wp_syntax"><div class="code"><pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #808080; font-style: italic;">/*
--&gt; Simple PHP login script
--&gt; By Andrew Pryde
--&gt; http://www.pryde-design.co.uk
*/</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// EDIT VARS</span>
<span style="color: #ff0000">$username</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$password</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #808080; font-style: italic;">// STOP EDIT</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// start a session (needed for detecting if the user is logged in or not)</span>
<span style="color: #000066;">session_start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// function to login the user or tell them that the username // pass is incorrect</span>
<span style="color: #000000; font-weight: bold;">function</span> login <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$user</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$pass</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">global</span> <span style="color: #ff0000">$username</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$password</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$user</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000">$username</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$pass</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000">$password</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #ff0000">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'LOGGED_IN'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;The password and or Username were incorrect&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// function to print the html login form</span>
<span style="color: #000000; font-weight: bold;">function</span> print_form <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #ff0000">$form</span> <span style="color: #66cc66;">=</span><span style="color: #ff0000;">'&lt;form action=&quot;'</span><span style="color: #66cc66;">.</span><span style="color: #000066;">htmlentities</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_SERVER</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'PHP_SELF'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&quot; method=&quot;post&quot;&gt;'</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$form</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">'Username:&lt;input name=&quot;user&quot; type=&quot;text&quot; /&gt;Password:&lt;input type=&quot;password&quot; name=&quot;pass&quot;&gt;'</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$form</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">'&lt;input name=&quot;Submit&quot; type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;&lt;/form&gt;'</span><span style="color: #66cc66;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000">$form</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'LOGGED_IN'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #000066;">empty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_GET</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'logout'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Members area....&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://pryde-design.co.uk/blog/wp-admin/<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Logout&lt;/a&gt;&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">elseif</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066;">isset</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'user'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #000066;">isset</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'pass'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
login <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'user'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'pass'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'LOGGED_IN'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Members area....&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://pryde-design.co.uk/blog/wp-admin/<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Logout&lt;/a&gt;&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">elseif</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_SESSION</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'LOGGED_IN'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$_GET</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'logout'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;yes&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">session_destroy</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;You have been logged out... &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://pryde-design.co.uk/blog/wp-admin/<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Login&lt;/a&gt;&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #66cc66;">&#123;</span>
print_form<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The code should explain its self as I commented it quite vigorously but if not feel free to comment below and or email me with any problems.</p>
<p>Just as a foot note Asome1 will be glad to see that I have used htmlentites() on the PHP_SELF variables in this script if you don&#8217;t know what I&#8217;m talking about you should read <a href="http://blog.pryde-design.co.uk/2008/03/24/xss-hole-in-php_self/">this post</a> .</p>
<p>I have made a newer version of this script called <a href="http://pryde-design.co.uk/blog/2008/03/27/advanced-mysql�?�d-login-scriptadvanced-mysql-php-database-backed-login-script/" target="_self">Advanced Mysql / PHP database backed login script</a> I would suggest you have a look at it as it includes some more useful features not seen in this version of the script.</p>
<p>- Andrew</p>
]]></content:encoded>
			<wfw:commentRss>http://pryde-design.co.uk/blog/2008/03/26/php-login-script-form/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
