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

<channel>
	<title>SGale</title>
	<atom:link href="http://sitegale.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://sitegale.com</link>
	<description>Free PHP tutorials and more!</description>
	<pubDate>Fri, 20 Feb 2009 15:21:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP &amp; JS: How to create a random quote generator!</title>
		<link>http://sitegale.com/?p=94</link>
		<comments>http://sitegale.com/?p=94#comments</comments>
		<pubDate>Sun, 25 Jan 2009 10:59:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Ajax and javascript]]></category>

		<category><![CDATA[PHP and Mysql]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=94</guid>
		<description><![CDATA[Preview of finished concept: http://www.sitegale.com/quote/index.php
Hey, today we will be creating a random quote generator, similar to http://thesurrealist.co.uk/slogan . We will be using html, php and javascript for this (the javascript is to apply some nice effects to it :)). We will run this without a mysql database, but you could easily run this from a [...]]]></description>
			<content:encoded><![CDATA[<p>Preview of finished concept: <a href="http://www.sitegale.com/quote/index.php">http://www.sitegale.com/quote/index.php</a></p>
<p>Hey, today we will be creating a random quote generator, similar to <a href="http://thesurrealist.co.uk/slogan">http://thesurrealist.co.uk/slogan</a> . We will be using html, php and javascript for this (the javascript is to apply some nice effects to it :)). We will run this without a mysql database, but you could easily run this from a mysql database or even a text file! This is the basic system, so you could add loads on to it.</p>
<p><span id="more-94"></span></p>
<h3>Step 1: Creating the index.php file</h3>
<p>This php file will be the page which links all the functions together. It will include the functions.php file and the javascript file (for the fade out effects). I have not applied any css effects to it this time, so it will look fairly bare! But 10 mins of css work could make it looking very attractive :).</p>
<p>Create a new file called index.php, and add the following code to it:</p>
<p><code>&lt;?php include('quotegen.php');?&gt;<br />
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
&lt;script type="text/javascript" src="js.js"&gt;<br />
&lt;/script&gt;<br />
&lt;meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /&gt;<br />
&lt;title&gt;&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body onLoad="javascript: opacity('result', 0, 100, 500)"&gt;<br />
&lt;div align="center"&gt;<br />
&lt;div id="container"&gt;<br />
&lt;form name="myform" action="index.php" method="post" id="myform"&gt;<br />
&lt;input name="button" type="input" value="Generate Quote" /&gt;<br />
&lt;label&gt;&lt;input name="word" type="text" class="my_textbox" id="textfield" maxlength="80"<br />
value="&lt;?php echo $word;?&gt;" /&gt;&lt;/label&gt;<br />
&lt;/form&gt;<br />
&lt;div id="result"&gt;<br />
&lt;?php if($word==''){echo 'Please enter a word';}else{echo $newquote;}?&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>I&#8217;ll explain this code a bit now. Where you this peice of code</p>
<blockquote><p>&lt;?php include(&#8217;quotegen.php&#8217;);?&gt;</p></blockquote>
<p>This is the php code that includes the quotegenerator file which is the main php core of this random quote generator.</p>
<blockquote><p>onLoad=&#8221;javascript: opacity(&#8217;result&#8217;, 0, 100, 500)&#8221;</p></blockquote>
<p>This bit of code makes the div &#8216;result&#8217; fade in on body load.</p>
<h3>Step 2: The javascript file (js.js)</h3>
<p>In this step we will create the javascript file which will add the cool fade in effect on body load <img src='http://sitegale.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Just adding a bit of eye candy to our project. This will make it more interesting than other random quote generators, which are usually static and boring ;).</p>
<p>Create a new file called js.js and add the following code to it.</p>
<p><code><br />
function opacity(id, opacStart, opacEnd, millisec) {<br />
//speed for each frame<br />
var speed = Math.round(millisec / 50);<br />
var timer = 0;<br />
//determine the direction for the blending, if start and end are the same nothing happens<br />
if(opacStart &gt; opacEnd) {<br />
for(i = opacStart; i &gt;= opacEnd; i--) {<br />
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));<br />
timer++;<br />
}<br />
} else if(opacStart &lt; opacEnd) {<br />
for(i = opacStart; i &lt;= opacEnd; i++)<br />
{<br />
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));<br />
timer++;<br />
}<br />
}<br />
}<br />
//change the opacity for different browsers<br />
function changeOpac(opacity, id) {<br />
var object = document.getElementById(id).style;<br />
object.opacity = (opacity / 100);<br />
object.MozOpacity = (opacity / 100);<br />
object.KhtmlOpacity = (opacity / 100);<br />
object.filter = "alpha(opacity=" + opacity + ")";<br />
}<br />
function shiftOpacity(id, millisec) {<br />
//if an element is invisible, make it visible, else make it ivisible<br />
if(document.getElementById(id).style.opacity == 0) {<br />
opacity(id, 0, 100, millisec);<br />
} else {<br />
opacity(id, 100, 0, millisec);<br />
}<br />
}<br />
function blendimage(divid, imageid, imagefile, millisec) {<br />
var speed = Math.round(millisec / 100);<br />
var timer = 0;<br />
//set the current image as background<br />
document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";<br />
//make image transparent<br />
changeOpac(0, imageid);<br />
//make new image<br />
document.getElementById(imageid).src = imagefile;<br />
//fade in image<br />
for(i = 0; i &lt;= 100; i++) {<br />
setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));<br />
timer++;<br />
}<br />
}<br />
function currentOpac(id, opacEnd, millisec) {<br />
//standard opacity is 100<br />
var currentOpac = 100;<br />
//if the element has an opacity set, get it<br />
if(document.getElementById(id).style.opacity &lt; 100) {<br />
currentOpac = document.getElementById(id).style.opacity * 100;<br />
}<br />
//call for the function that changes the opacity<br />
opacity(id, currentOpac, opacEnd, millisec)<br />
}</code></p>
<p>As you can see, I have commented this file :). Please feel free to check through this code to learn new techniques. Usually I would use a javascript framework such as jquery to do this tutorial, but in this case I wanted to build a quick light engine. Save your js.js file NOW!</p>
<h3>Step 3: The Quotegen.php file</h3>
<p>This file will process all of the information for our random quote generator. We will need to secure it as well, to prevent xss attacks (Javascript injections such as alerts e.t.c). You can add any amount of quotes to this, I only added a few to give you a quick demo :P.</p>
<p>Create a new file called quotegen.php and add the following code to it.</p>
<p><code><br />
&lt;?php<br />
// If you need any help with this file, please ask! Thankyou <img src='http://sitegale.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
if(isset($_POST['button'])) {<br />
$word = $_POST['word'];<br />
/* These are the quotes, to add more just make a new $quotes[] = &#8216;Randomthing&#8217;.$word.<br />
The $word part is the part that comes from the text box */<br />
$quotes[] = htmlspecialchars($word.&#8217; milk since 1960&#8242;);<br />
$quotes[] = htmlspecialchars(&#8217;Mummy, whats a &#8216;.$word);<br />
$quotes[] = htmlspecialchars(&#8217;The best way to start a morning is with a &#8216;.$word.&#8217; in your face&#8217;);<br />
// Don&#8217;t touch below <img src='http://sitegale.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
srand ((double) microtime() * 1000000);<br />
$random_number = rand(0,count($quotes)-1);<br />
$newquote = htmlspecialchars($quotes[$random_number]);<br />
}<br />
?&gt;<br />
</code></p>
<p>As you can see again, I have commented it. But i&#8217;ll quickly run through it with you.</p>
<blockquote><p>if(isset($_POST['button'])) {</p></blockquote>
<p>This bit of php code checks whether the button has been pressed, stopping people messing with our system :).</p>
<blockquote><p>$quotes[] = htmlspecialchars($word.&#8217; milk since 1960&#8242;);</p></blockquote>
<p>This bit of code is one of the quotes. To add more quotes, copy this line and put &#8216;$word&#8217; anywhere in the sentence, and have the rest in quotes. YOu can add as many quotes as you want!</p>
<p>Now save this quotegen.php file :).</p>
<h3>Ending notes and download files</h3>
<p>I hope you have enjoyed this tutorial on how to create a random quote generator with javascript and php. If you have any questions about this tutorial, then please comment here or contact me on: ezia-work@hotmail.co.uk.</p>
<p>I have attached the download link below, enjoy!</p>
<p><a href="http://sitegale.com/quote/quotelaugh.rar">http://sitegale.com/quote/quotelaugh.rar</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=94</wfw:commentRss>
		</item>
		<item>
		<title>Important SEO factors</title>
		<link>http://sitegale.com/?p=90</link>
		<comments>http://sitegale.com/?p=90#comments</comments>
		<pubDate>Tue, 13 Jan 2009 19:53:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Other languages]]></category>

		<category><![CDATA[Reviews]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=90</guid>
		<description><![CDATA[

Search engine optimization is an important field of research where every moment strategic planning is required so that consumers of online visitors feel like interested in visiting the sites quite often. How to achieve this success is what is dealt in SEO techniques. The site must be made to increase its rank in the listing [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" align="center"><strong><br />
</strong></p>
<p class="MsoNormal"><span>Search engine optimization is an important field of research where every moment strategic planning is required so that consumers of online visitors feel like interested in visiting the sites quite often. How to achieve this success is what is dealt in SEO techniques. The site must be made to increase its rank in the listing of the search engine and there are several factors like Keywords, Meta tags, Backlinks, traffic e.t.c which will make the site a success. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><strong><span>Tips and tricks for SEO</span></strong></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>The SEO techniques are not just targeted at the objective of achieving commercial benefit but also a great platform to present the perfect blend of scientific intelligence and artistic creativity. There will be the need of incorporating site maintenance in the form of addition of different changes which must take place on and off the website. This will in turn increase the traffic flow towards the site. And definitely this will help in attaining the top rank of the directory of search engine. The factors of on-page and off-page can be stated as the main driving features for search engine optimization. Both of the factors are very interesting to deal with. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>In case of off-page factors the sphere of activity is mainly concentrated on the aspects that are outside the web page. This involves the areas of web sites which belong to others. On the other side the on-page factors generally look into the facets where titles, keywords, contents, and description of the topics are given more priority. It is very important that when the websites are developed with the aim of trying to achieve a high ranking some facts are to be considered. Like there is great competition for the keywords. The design of the web site is a great attracting feature. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>It is important that the time duration for which the site has been on the web. People in search of information must be satisfied with the content they were looking for. So the content of the website has to be impressive and informative. The higher the number of links that are pointed to the website the better and this is also a central factor. Your site must be maintained monthly and the plan which is related to looking after the website must have a great potential. The degree of significance that the site has in relation to the presence of the site on the web is important. <strong></strong></span></p>
<p class="MsoNormal"><strong><span> </span></strong></p>
<p class="MsoNormal"><strong><span> </span></strong></p>
<p class="MsoNormal"><strong><span> </span></strong></p>
<p class="MsoNormal"><strong><span> </span></strong></p>
<p class="MsoNormal"><strong><span> </span></strong></p>
<p class="MsoNormal"><strong><span> </span></strong></p>
<p class="MsoNormal"><strong><span>Effective functioning to implement correctly the factors for SEO</span></strong></p>
<p><span>Just recognizing the factors for improving the search engine optimization is not enough. The factors must be put to accurate actions so that you don?t lag behind in the huge competition. What makes a website the most propitious one is the content of the site. If the content is the one which will sell well then the site will bag some advantageous position. Meta tags for search engine optimization is the feature which is considered important by some but there are people who also prefer to ignore the presence. </span></p>
<p><span>Incorporating Meta tags are not necessary but if it is included then the coding must be done correctly. Meta tags are basically the HTML tags which are not observable on the portion where the contents are put on view on the web page. The head section of the web page contains the Meta tags which are generally started by the &lt;head&gt; and ended by &lt;/head&gt;, the common HTML tags. Though the layman cannot differentiate it the sycophants of the search engines can identify them. The site ranking is not completely dependent on the Meta tags and the rankings can even do well without the use of Meta tags. Some common Meta tag types are ?content type meta tag?, ?description meta tag?, ?robots meta tag?, or ?keywords meta tag?. The site must have large sum of backlinks. It enhances the ranking of the website. </span></p>
<p><span>If you want to increase the backlinks then the facts like joining forums and marketing over there, adding to bookmarks, exchanging links, posting in different blogs are very useful. Since search engine is used to find the required information the visitors will have to place the correct keyword. And this keyword is very essential for the search engine optimization. Because your site is best recognized by the product you are dealing in your site. And the products are identified through the keywords. The time is gone for one-word search out string and this is no more prevalent. </span></p>
<p><span>The search engine is already crowded with many websites, and so the keywords of one word length don?t fetch the top position any more. So in the crowd if you want to be recognized easily then you will have to vie for the ideal keyword. This is a more realistic approach. For example when you are making a site based on the pets, then you have to tell about the pet in your site. Your site can specialize on one pet or may have articles on different kinds of pets. So the keywords can be inclusive of ?dog food habit? or ?dog exercise? or ?dog breeds? etc and many more. <span> </span>It is advisable that you arrange for your site own traffic or the connections in an ordinary process rather than purchasing it. </span></p>
<p><span>It may take some time but this role is very significant on your part. There are some sites who offer the services of building up network for your site. They generate the traffic against prices. If you come across alluring offers like getting as much 200,000 visitors to your website for ten dollars or 6,000 backlinks for twenty five dollars then don?t get tempted and never ever use such service for creating traffic. This can lead you to consequences by the search engines if you are caught with such services you are availing off. So while you are developing the website keep in mind about the factors that will enable you develop the site that will have the potential of achieving highest rating for search engines. </span></p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=90</wfw:commentRss>
		</item>
		<item>
		<title>Making money as a freelance webdesigner</title>
		<link>http://sitegale.com/?p=88</link>
		<comments>http://sitegale.com/?p=88#comments</comments>
		<pubDate>Tue, 13 Jan 2009 19:53:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=88</guid>
		<description><![CDATA[

Web designing or generating the language codes for the web pages is an excellent job and needs quite creative applications. Have you ever thought of making money as a freelance web designer/coder? Though computer engineering is basically about numeric calculations and implementing number systems into different programming languages try to think with an out of [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" align="center"><strong><br />
</strong></p>
<p class="MsoNormal"><span>Web designing or generating the language codes for the web pages is an excellent job and needs quite creative applications. Have you ever thought of making money as a freelance web designer/coder? Though computer engineering is basically about numeric calculations and implementing number systems into different programming languages try to think with an out of the ordinary point of view to work on your own by setting up a separate business on web page designing. Making money as a freelance web designer/coder can be a great opportunity. </span></p>
<p class="MsoNormal"><span><span> </span></span></p>
<p class="MsoNormal"><strong><span>Where to sell your premade templates</span></strong></p>
<p><span>There are different stores online where you can sell your premade templates. The stores will be paying you the right amount once they approve the designs. But your designs will be purchased only when they have the creativity to please the purchasers. You can advertise on different sites showing some sample work and mentioning the price of your work. Some good places for selling the designs are ?talkfreelance.com?, ?jauharimedia.com?, ?and the eBay Stores design directory? etc. a great idea is developing your own website which specializes in selling the design templates you have created. </span></p>
<p><span>If you have the right design at the right price it will sell.</span><span> </span><span>If you are joining the communities for web designing or contests then you must have the same name on the web. This is because then people will know about you. They will recognize the work that you have done through your credentials. You have to give the details of your contact. You must make the task easy for the customers. If they know that you have the right skills then they will contact you and it will be a much fast process. </span></p>
<p class="MsoNormal"><strong><span>How to charge the right amount</span></strong></p>
<p><span>This is a major concern for a freelance web designer/coder. Especially if you are new in this field then you will have to know the ins and outs about the price calculation of the site. So you have to have good accounting knowledge if you are working as freelancer web designer or coder. In the charging decision you have to think about the points like the amount that you should charge or the time of billing or the pricing standard that is to be followed or whether you shall charge per hour or not. Your billing timing must be broken up. </span></p>
<p><span>The billing time can be dependent on the nature of the projects. If your project is big then you shall take the advance and then the rest of the amount can be broken up into two or sometimes three bills. For the project that won?t take much time you may ask for advance as much as half the amount of the bill and charge the rest after completion of the design before you are submitting. One thing must be taken care of that is you must first take the early payment amount and only then start your work. Many people have the tendency of delaying the payment. </span></p>
<p><span>These are dangerous manipulation strategies that are often adopted and you must remain aware of those. But yes if you have a host of consistent and dependable clients then you can consider about some pricing relaxation. You will also have to decide the correct amount of pricing that you must charge. It will be foolish to rate a price that is too low. Once you start this policy then your list of clientele would include only them who have least interest in paying the prices or you will receive some unprofitable projects for which you will have to work hard. This is probably not desirable. </span></p>
<p><strong><span>Choosing the best sites for work</span></strong></p>
<p><span>As you decide to work as the freelance web designer/coder you will need the correct opening or the platform from where you will get the projects or from where you will carry out your consecutive works.<span>  </span>If you try to find out the work boards you will see that there are lots of jobs present. But how many of those are really the correct ones to appreciate the hard work that you will do are really dubious. </span></p>
<p><span>You will find that the companies approaching you are not willing to you the worth money even if the project has to be done with lot of care. The job boards do have jobs to offer but the quality of jobs are not so high. So you won?t feel like applying for those. But still here are some of the good sites who can offer you some quality work. noagenciesplease.com, odesk.com, jobs.freelanceswitch.com, elance.com, sologig.com, authenticjobs.com, guru.com, freshwebjobs.com, krop.com, getacoder.com do pay you good amount that is worth your effort and time. </span></p>
<p><strong><span>How to advertise your services and work hard for success</span></strong></p>
<p><span>If you want your talent about web designing to be known all over the best thing to do is advertise your skills. Engage with designcrowd.com, webdesignforums.net to provide the advertisement about your skills. A very good option is to participate in the different competitions that have the chance to make new avenues. If you win then there are many new projects coming up. But if there is loss don?t be disheartened by that rather you can learn many things from that. Through this you can also build your own portfolio. You can also advertise in different other sites. </span></p>
<p><span>Remember you must feel the enthusiasm to work and this is what that will keep you getting new works and good money can be made by working as a freelance web designer/coder. You will need a good collection of clients who know to respect the work and never delays payments. Once you have a good experience of work you will never require any other kind of job. It cannot be said that the whole process of work is very easy. Though you are working as a freelancer you are basically shouldering the whole lot of responsibility on your shoulders. So, just like any other kind of business this one also has some stumbling blocks which you will have to overcome in order to succeed. </span></p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=88</wfw:commentRss>
		</item>
		<item>
		<title>The changes in  webdesign and web 2.0</title>
		<link>http://sitegale.com/?p=85</link>
		<comments>http://sitegale.com/?p=85#comments</comments>
		<pubDate>Tue, 13 Jan 2009 19:50:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=85</guid>
		<description><![CDATA[The changes in  webdesign and web 2.0

 
Web 2.0 was the wide awake step for bringing a change in the computer industry. Computer industry is widely influenced by the internet. Web design requires a concentrated aim at the creativity and regular improvement of this aspect. Web 2.0 usually expresses the change in trends and [...]]]></description>
			<content:encoded><![CDATA[<h2><strong>The changes in  webdesign and web 2.0<br />
</strong></h2>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Web 2.0 was the wide awake step for bringing a change in the computer industry. Computer industry is widely influenced by the internet. Web design requires a concentrated aim at the creativity and regular improvement of this aspect. Web 2.0 usually expresses the change in trends and different other facts that are always related to the web. <span> </span>Through Web 2.0 tries to improve the communications, a much more secured sharing of important information, collaboration, resourceful changes and the functionality, all of which generally are interdependent features for the world wide web.<span>  </span></span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>The first appearance of the term was made more prominent after the conference of O&#8217;Reilly Media Web 2.0 during 2004. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><strong><span>The great influence of Web 2.0 on the web and designing</span></strong></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>The concepts of Web 2.0 when applied on the techniques of internet the world saw the developments like different communities on internet by which the global communication got a whole new meaning. Also many improvements in services through internet were also achieved. Different sites like the sites for sharing video, social networking, wikis, folksonomies, or blogs came up with many features. The Web 2.0 may relate to improvement to World Wide Web but not much technical upgrading is not quite the fact. But on the contrary it is actually a guide to how the web can be used in a further significant method by the software engineers as well as the users of internet. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>But Tim Berners-Lee who invented the immense World Wide Web is stating that he feels rather dubious about the actual utility of Web 2.0. He feels that all the terminologies and the technical aspects are nothing new and had already be existent at the origin of the Web. O&#8217;Reilly says that the breakdown of the ?dot-com bubble? at 2001 is the basis so that Web 2.0 can be taken into account as the flood back business. Web 2.0 can be helpful for web designing too. While designing a website using Web 2.0 has provided some creative possibility where important data can be broken up to units of microcontents. The microcontent next can be divided to more domains. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Here we consider a set of supplies of contents which are provided by different groups like folks or corporations or governments. Now we are going to develop interfaces depending on the collection of web contents and the different data would be combined in several techniques. This would be some unique process which would be impossible to be done by a sole domain. If we have to mention a specific example we can tell about ?Amazon.com?. The site allows entr?e of it?s the contents to the external world. Somebody else can plan an interface so that will replace Amazon so that a more customized design is achieved through this method. For example we can take Amazon light. ?The Web as platform? is the name by which Web 2.0 is often known as. So if it is reflecting as a platform so that interaction of contents can be done then it is implying that the design of the web is getting some impacts. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><strong><span>Trends describing the web design</span></strong></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Web 2.0 is the improvement that was expected from the Web 1.0. We can find almost six trends through which we can distinguish Web 2.0. Web 2.0 has seen a leap to semantic markup. This markup language can in a compact and correct way describe the content on which it is being applied. HTML and XHTML are the most common markup languages though here the semantic property can also be applied. But with the use of Web 2.0 the description of the contents are more defined. Designing the web through Web 2.0 comprises of experiences that are driven by events to be more precise instead of the sites. It is now the time that the web designers shall think about how to trade name the content materials besides the site designing. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Web 2.0 is actually a shift towards the programming structure. It makes us feel the need of separation among the styling and makeup of designs. Place is important rather than the visual effects is the implication from Web 2.0. Through Web 2.0 the outline or sketch and arrangement is not the priority which is given. In there place the semantics and the statements are more important. Actually all this is making the web designers work for the computer systems and attracting people by the designed sites are not given the importance. The web designers shall also become the programmers and the contents are to be reached through programs. Web 2.0 has some remixing features. By this most of the contents will be met at first far from the actual domain. This will require much navigation for getting the content. Web 2.0 is seeing that users can also add metadata. Flickr and Del.icio.us allows every user to write taglines along with the items of digital media. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>But this is not the most attention-grabbing aspect, but what is more vital is that of the trends that can be witnessed as we are collecting together every person?s tags. Web 2.0 has tried to establish all the facts that it thinks useful for the web designing. But the fact is will the Web 2.0 really be as much effective as it intends to be. Infact a whole lot of argument is present and it tells that the Web 2.0 is no way corresponding to World Wide Web. Rather the facts are trying to tell that majority of concepts that are used here is already encountered in the earlier Web 1.0. HTTP is a very long established set of standards for the internet and AJAX is not capable of replacing it.<span>  </span>We were in this article trying to find what effect Web 2.0 could have made on the designers. Though restrained but still some effects are felt by Web 2.0 on the designers. It is expected that further improved effects will be felt on the designing through web 2.0.<span>  </span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=85</wfw:commentRss>
		</item>
		<item>
		<title>Choosing the best PHP framework</title>
		<link>http://sitegale.com/?p=82</link>
		<comments>http://sitegale.com/?p=82#comments</comments>
		<pubDate>Tue, 13 Jan 2009 19:48:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=82</guid>
		<description><![CDATA[Choosing the best PHP Framework

Zend Framework, Prado, CodeIgniter, Symfony, Kohana, CakePHP and many others. These are names of the widespread PHP frameworks. Each one has its own preferences to its users. Now you must be thinking about which one to use? Why will you use that one? Why not any other one? What benefit will [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align: left;"><strong><span>Choosing the best PHP Framework</span></strong></p>
<p class="MsoNormal"><span><br />
Zend Framework, Prado, CodeIgniter, Symfony, Kohana, CakePHP and many others. These are names of the widespread PHP frameworks. Each one has its own preferences to its users. Now you must be thinking about which one to use? Why will you use that one? Why not any other one? What benefit will it provide than the other one? The list of queries will go on endlessly until you don?t study all about the frameworks. Yes, each one of these has their own share of advantages and disadvantages but still only among those you will have to find the one that will suit your need in the best possible way. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Choosing the best PHP Framework has become the latest buzz as PHP frameworks are becoming the important working platform and security is very important. These days almost every designer is working on the concept. So the choice of a platform is not very new one. But what is important is the selection of the best framework that is encompassing different aspects of PHP. At the same time the best PHP framework is actually dependant on the personal needs as well as the needs of the project on which you are trying to prove a good and efficient work. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><strong><span>The facts that you must match against each framework</span></strong></p>
<p class="MsoNormal"><strong><span> </span></strong></p>
<p class="MsoNormal"><span>If you are looking for the framework that is most hyped among the others is that of Zend Framework. And it also has its own reasons for getting so much attention. After all Zend was the actual originator of the PHP and is also the fastest one. The good features of the framework are that the features are quite rich and fulfilling. It is somewhat tough though it is filled with all the substance that any corporate work may demand for. But it also has some problems like the Zend Framework don?t have the aspects like PHP4. Probably learning of this framework is not quite easy for anyone. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Those developing the designs for good big companies can benefit from this if only they can in a good way identify the framework in a proper way. Something different can be found from the Prado and is much far away from ?rails clone?. Though it is relatively new and is less powerful than ASP.net still it can be a good background for the ones who have some concept of ASP.net or have some interest on that field. The name that is given to Prado is that of ?ASP.net in PHP?. The choice for the big companies is that of ASP.net. Through the use of ASP.net then the different apps which are basically based on events can be drawn more easily. CakePHP is the PHP Framework which is these days getting the reorganization to the fullest. It is also showing through its performance that it has some good and bright future. </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>This framework probably has the capacity which can be used by all types of application so that their popularity is rising. The different usage of rails can have the freedom with the site being capable of working easily but the speed is not so much remarkable. Such points affectedly. CMS mambo is known by all the people. Even they are using the CakePHP for the next project work. Symphony has many featured added to it. This framework has distinguishing factors like use of modules are done so that dealing with things like DB layer can be done. The slow factor for this framework is not appreciated by any. When you are working in any project where there are some of the good features required, in such cases Symphony is used. But if it is so much time consuming then definitely the overhead cost do increase. </span></p>
<p><span>In comparison to many frameworks Kohana is not so much popular. Common public do not know much about Kohana. There are two types of people using Kohana. They are generally the users of ex-CI. Also there are users who prefer both of the Kohana and CI. CodeIgniter is a very useful framework. This framework has achieved the name of ?the easy CakePHP? by many. Strict MVC patterns used by those of cake or rails are not so prevalent over here. As a result this framework is kind enough for the beginners to learn. Besides being very simple for learning, the framework is also quite very fast. Rather in comparison to some other frameworks this framework is working faster. There are also different kinds of added features. </span></p>
<p><span>This framework favors the more traditional style of PHP coding, which can generally be considered as the good applicant for the porting of the codes that already exists. Among all of the ones that are existing here in the list it can be said that CakePHP is a very much suitable one. This one will definitely suit any of the projects that you undertake. Using CakePHP framework it is found that the rate of developments are quite fast and this is a very positive factor for any framework. But it is also a fact that it will take some time to master the art in a very creative fashion. If you are the one who love challenges and fight for winning the challenges then Prado is the one for such people. </span></p>
<p><span>The successful and established big corporations must not go for anything else and for them Zend is the best choice ever. The initial workers in this field can go for CodeIgniter. Many may prefer Drupal if in a hurry for developing the sites. So now you have all the relevant and important information that will help you in deciding the framework that will suit your work the best. So it is only you who do know the best which PHP framework will e the best one for you. But before choosing any it is important that all the facts must be kept properly in mind and it is always good to learn something more than the facts that are available. </span></p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=82</wfw:commentRss>
		</item>
		<item>
		<title>Top 10 web 2.0 scripts</title>
		<link>http://sitegale.com/?p=64</link>
		<comments>http://sitegale.com/?p=64#comments</comments>
		<pubDate>Fri, 09 Jan 2009 12:30:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=64</guid>
		<description><![CDATA[Web 2.0 is a new design fad, but it also extends to scripts. With ajax becoming more popular, because of it&#8217;s live validation capabilities, the web 2.0 application is now better than ever. Some of the online applications nowadays would be deemed impossible 5 years ago. But here we are.

O&#8217;Reilly describes web 2.0 as
The business [...]]]></description>
			<content:encoded><![CDATA[<p>Web 2.0 is a new design fad, but it also extends to scripts. With ajax becoming more popular, because of it&#8217;s live validation capabilities, the web 2.0 application is now better than ever. Some of the online applications nowadays would be deemed impossible 5 years ago. But here we are.<br />
<span id="more-64"></span></p>
<p>O&#8217;Reilly describes web 2.0 as</p>
<blockquote><p>The business revolution in the computer industry caused by the move to the Internet as a platform, and an attempt to understand the rules for success on that new platform. Web 2.0 describes a transition of the World Wide Web from a system of websites to a second generation platform of social networking sites, communication tools, and web applications.</p></blockquote>
<h3>1) Delicious</h3>
<p><a href="http://delicious.com/"><img class="aligncenter" title="Delicious" src="http://i41.tinypic.com/9tofug.gif" alt="" width="680" height="127" /></a></p>
<p>Delicious, at one time del.icio.us, is a social bookmarking web service for storing, sharing, and exposing web bookmarks. A lot of characteristics have been added to Delicious, making it one of the most loved social bookmarking websites.</p>
<h3>2) Facebook</h3>
<p><a href="http://www.facebook.com"><img class="aligncenter" title="Facebook" src="http://i44.tinypic.com/1pw5zn.gif" alt="" width="680" height="127" /></a></p>
<p>Facebook is a general, free social networking site that is controlled and owned by Facebook. People can join user networks and social groups organized by city, workplace, school and other general categories to encounter with new people. Facebook was originially developed as a social network for students keeping in touch over campus.</p>
<h3>3) Twitter</h3>
<p><a href="http://www.twitter.com"><img class="aligncenter" title="Twitter" src="http://i44.tinypic.com/x5td8n.gif" alt="" width="680" height="127" /></a></p>
<p>Twitter is a free social networking and micro-blogging service that grants its members to send and read other users&#8217; updates. This again is another social networking site, where people can meet new people. People have now jumped on the twitter bandwagon, and have developed twitter 3d party scripts that allow you to modify your twitter account without going on twitter. The Users updates are often called &#8216;Tweets&#8217;, which is a friendlier way than calling them updates.</p>
<h3>4) Bebo</h3>
<p><a href="http://www.bebo.com"><img class="aligncenter" title="Bebo" src="http://i42.tinypic.com/2mzxl3r.gif" alt="" width="680" height="127" /></a></p>
<p>Bebo is a popular social networking website, founded in January 2005. It is a worldwide service, so users around the whole world can join this vast community.  It also has a multiple language selector, so users from around the world, again can join it. Bebo was founded by two newly weds,  Michael and Xochi Birch. Bebo was aquired by AOL in late 2008 for $850 Million.</p>
<h3>5) Feedburner</h3>
<p><a href="http://www.feedburner.com"><img class="aligncenter" title="Feedburner" src="http://i42.tinypic.com/2hdpjx1.gif" alt="" width="680" height="127" /></a></p>
<p>Feedburner is provider of media distribution and audience engagement services for blogs and RSS feeds. Feedburner provides custom RSS feeds and direction tools to webmasters alike. It also includes lots of nifty little tools such as web traffic software and much more. Feedburner was aquired in Autumn 2008 by Google Inc for $100 Million. After this new ownership, feedburner become a much better service than before, offering the full extent of google&#8217;s programmers.</p>
<h3>6) Meebo</h3>
<p><a href="http://www.meebo.com"><img class="aligncenter" title="Meebo" src="http://i43.tinypic.com/23m0z0l.gif" alt="" width="680" height="127" /></a></p>
<p>Meebo is a web application that allows you to sign in with your msn, google, AIM, yahoo or myspace accounts and start instant messaging to your friends without having to download the required programs. It was built with ajax using the popular coding framework made by Pidgin. It was developed in mind for mobile phones, such as iPhone and Android mobiles. It was started in 2005 by Sandy Jen, Seth Sternberg and Elaine Wherry, in their office based in California.</p>
<h3>7) Myspace</h3>
<p><a href="http://www.myspace.com"><img class="aligncenter" title="Myspace" src="http://i39.tinypic.com/2s849d2.gif" alt="" width="680" height="127" /></a></p>
<p>MySpace is a social networking website which allows it&#8217;s members to create a page about themselves, where they can create blogs, add pictures, upload music add friends and much more! It was developed for adults and teenagers internationally, currently featuring a language selector.</p>
<h3>8 ) Flickr</h3>
<p><a href="http://www.flickr.com"><img class="aligncenter" title="Flick" src="http://i40.tinypic.com/343np1u.gif" alt="" width="680" height="127" /></a></p>
<p>Flickr - almost certainly the best online photo management and sharing application in the world - has two main goals: 1. We want to help people make their photos available to the people who matter to them. 2. We want to enable new ways of organizing photos.</p>
<h3>9) Voo2do</h3>
<p><a href="http://voo2do.com/"><img class="aligncenter" title="Voo" src="http://i43.tinypic.com/149705y.gif" alt="" width="680" height="127" /></a></p>
<p>Advanced task and priority management for busy, ambitious individuals. voo2do tracks priority, due date, and time estimates for each task. There is no notion of &#8220;lists&#8221; in voo2do? tasks can be grouped by project, but you can view and edit a bunch of projects together. Voo2do does not yet support sharing your tasks with other people.</p>
<h3>10) Zoto</h3>
<p><a href="http://www.zoto.com"><img class="aligncenter" title="Zoto" src="http://i40.tinypic.com/2nrllrp.gif" alt="" width="680" height="127" /></a></p>
<p>On Zoto, you can safely store an. organize an unlimited number of digital photos, with total control over who has access to which of your photos. You can share your photos with family and friends through albums and slideshows. You can quickly and easily publish photos to your blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=64</wfw:commentRss>
		</item>
		<item>
		<title>New Ajax tutorial: Live user validation</title>
		<link>http://sitegale.com/?p=52</link>
		<comments>http://sitegale.com/?p=52#comments</comments>
		<pubDate>Fri, 09 Jan 2009 10:27:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Ajax and javascript]]></category>

		<category><![CDATA[PHP and Mysql]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=52</guid>
		<description><![CDATA[Hello, in this tutorial you will learn how to create a live user validation, where it checks the database for existing users, and reports out whether it is taken or not using live ajax. This can be applied for many other similar techniques, such as live validation, live email validation e.t.c.

For this tutorial, you will [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, in this tutorial you will learn how to create a live user validation, where it checks the database for existing users, and reports out whether it is taken or not using live ajax. This can be applied for many other similar techniques, such as live validation, live email validation e.t.c.</p>
<p><span id="more-52"></span></p>
<p>For this tutorial, you will need a mysql database, and a server with PHP Installed. If you do not currently own a server, or have hosting with PHP enabled then please download PHP <a href=&quot;http://www.php.net/downloads.php&quot;>here</a>.</p>
<h3>Step 1) Creating the index.html file</h3>
<p>This file will be the easiest file in this tutorial. All it is is a simple html page with a form added. I have applied some simple styles to the page to make it look a bit nicer, but you can take those off if you wish. This file will hold all of the scripts, brining them together. Without this file, the script would not work.</p>
<p>Create a new file called &#8216;index.html&#8217; (without the quotes) and save it. Insert this bit of code (Below) into the index.html file and then save it again.</p>
<p><code>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;style type=&quot;text/css&quot;&gt;<br />
.correct<br />
{<br />
color:#B3DF00;<br />
}<br />
.wrong<br />
{<br />
color:#FF0000;<br />
}<br />
body,td,th {<br />
font-family: Arial, Helvetica, sans-serif;<br />
font-size: 12px;<br />
}<br />
&lt;/style&gt;<br />
&lt;script src=&quot;usercheck.js&quot;&gt;&lt;/script&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form&gt;<br />
Desired Username:<br />
&lt;input type=&quot;text&quot; id=&quot;txt1&quot;<br />
onkeyup=&quot;checkUser(this.value)&quot;&gt;<br />
&lt;/form&gt;<br />
&lt;p id=&quot;validateCheck&quot;&gt;&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>Basically, at the top we have the common head tags (If you do use this, please add the xml in the html tag :)). Then we have the simple stylesheet for the page, containing the correct, and wrong classes and the body styles (just the font size and the font family). Next  we have the &lt;script&gt; tag containing the url to the javascript code (which we&#8217;ll write in a minute). And then finially the form that we will use to check whether a user exists or not.</p>
<p>This little piece of code (below) tests whether the user has typed anything, and if they have, then it calls the javascript function which interacts with the PHP file.<br />
<code>onkeyup=&quot;checkUser(this.value)&quot;</code></p>
<p>Save this index file now. As you don&#8217;t want to loose any work.</p>
<h3>Step 2) Creating the usercheck.js file</h3>
<p>This is the &#8216;ajax&#8217; file as it were, it contains all the code needed to get the data from the form in instant time, send it to the PHP file and get the end result from the PHP File. It will also check whether the user has ajax enabled on their browser, and, if they don&#8217;t, sends out an alert message saying that their browser does not support ajax. Very few browsers do not support ajax, the big 4 (IE Explorer, Google Chrom, FireFox and Safari) all support ajax.</p>
<p>Create a new file called &#8216;usercheck.js&#8217; and save it in the same directory as the index.html file. Next, add the following code to your usercheck.js file and save it.<br />
<code>lfunction checkUser(str)  // Creates a new checkUser function.<br />
{<br />
if (str.length==0) // checks if the str variable inside the checkUser function is equal to 0<br />
{<br />
document.getElementById(&quot;validateCheck&quot;).innerHTML=&quot;&quot;; // Gets the html object by it's id, in this case it's id is validateCheck<br />
return; // Returns the end result of the function<br />
}<br />
xmlHttp=GetXmlHttpObject();<br />
if (xmlHttp==null) // Checks whether the users browser allows ajax<br />
{<br />
alert (&quot;Please use a browser that has ajax enabled!&quot;); // Alerts if the users browser does not support ajax<br />
return; // Returns the function<br />
}<br />
var url=&quot;usercheck.php&quot;; // Creates a new variable called url<br />
url=url+&quot;?user=&quot;+str; // Assigns an id to the php file (usercheck.php?id=user)<br />
url=url+&quot;&amp;sid=&quot;+Math.random(); // Assigns a random math function to the url<br />
xmlHttp.onreadystatechange=stateChanged; // If the forms state has changed<br />
xmlHttp.open(&quot;GET&quot;,url,true); // Gets a pages content using ajax<br />
xmlHttp.send(null);<br />
}<br />
function stateChanged()<br />
{<br />
if (xmlHttp.readyState==4)<br />
{<br />
document.getElementById(&quot;validateCheck&quot;).innerHTML=xmlHttp.responseText;<br />
}<br />
}<br />
function GetXmlHttpObject()<br />
{<br />
var xmlHttp=null;<br />
try<br />
{<br />
xmlHttp=new XMLHttpRequest();<br />
}<br />
catch (e)<br />
{<br />
try<br />
{<br />
xmlHttp=new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);<br />
}<br />
catch (e)<br />
{<br />
xmlHttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />
}<br />
}<br />
return xmlHttp;<br />
}</code></p>
<p>Basically what this file does is it sends the variable from the textbox to the php file using PHP&#8217;s $_GET function. It also checks whether the users browser can support ajax. I have commented the necessary parts of this file for you, so youc an get a better understanding of the works of this project. Save this file, so we can work on the last and final page. The usercheck.php page.</p>
<h3>Step 3) The usercheck.php file</h3>
<p>Create a new file called &#8216;usercheck.php&#8217; and save it to the same directory as the index and the usercheck.js file. This will be the main processing file, checking whether the user exists or not. It holds all the functions to connect to the database, checks whether the user exists and the outputs it.</p>
<p>Add the following code to your &#8216;usercheck.php&#8217; file.<br />
<code>l&lt;?php<br />
$database_name = 'yourdbname'; // Enter your database name<br />
$database_user = 'yourdbuser'; // Enter your database username<br />
$database_pass = 'yourdbpass'; // Enter your database password<br />
$database_host = 'yourdbhost'; // Enter your database hostname<br />
$sql = mysql_connect($database_host,$database_user,$database_pass); // Connects to the mysql database<br />
if(!$sql) // If it doesnt work<br />
{<br />
die('Error, couldnt connect to the database.');  // 'Die's with an error message<br />
}<br />
else // If it does work<br />
{<br />
$select_db = mysql_select_db($database_name); // Selects the database<br />
if(!$select_db) // If it can't select the database<br />
{<br />
die('Couldnt connect to the database.'); // Die's an error message.<br />
}<br />
}<br />
// Get the user id from URL<br />
$user=htmlspecialchars(mysql_real_escape_string($_GET[&quot;user&quot;]));<br />
$query = mysql_query(&quot;SELECT * FROM users WHERE username = &#8216;&quot; .$user.&quot;&#8217;&quot;) or die(mysql_error());  // Change users to the database where you keep your usernames, and likewise with username<br />
list($user_id) = mysql_fetch_row($query);<br />
$row = mysql_fetch_array($query);<br />
if(empty($user_id))<br />
{<br />
$check = &#8216;&lt;span class=&quot;correct&quot;&gt;That username is available.&lt;/span&gt;&#8217;;<br />
}<br />
else<br />
{<br />
$check = &#8216;&lt;span class=&quot;wrong&quot;&gt;That username is not available.&lt;/span&gt;&#8217;;<br />
}<br />
// Echos whether the user exists or not.<br />
echo $check;<br />
?&gt;<br />
</code></p>
<p>Now save this usercheck.php file. I&#8217;ll explain this file a little bit. At the top, we hold the mysql connection variables, please fill these in with your own mysql connection details. Next we have the actual mysql_connect function with a bit of troubleshooting. Following that, in the same if function we have the mysql select db function which selects the database, and again we have some troubleshooting.</p>
<p>After that, you will see a piece of code like this</p>
<p><code>$user=htmlspecialchars(mysql_real_escape_string($_GET[&quot;user&quot;]));</code></p>
<p>This gets the user variable from the URL, and assigns it to a variable. As well as securing it against xss and sql injections.</p>
<p>After that we have the function that checks whether the username exists in the database, or not, and then assigns the appropriate output to the $check variable which will be echoed at the end of the script.</p>
<h3>Final words</h3>
<p>Thankyou for viewing this tutorial, I would love to put more detail into it, but I hope I&#8217;ve taught you the basics of live validation. You can now try out different methods, such as live email validation and checking whether a user has filled in a form or not. If you wish to download all the files used in this tutorial, then please check below for the link. Again, if you have any comments or improvements then please use the comment feature below. Thankyou :).</p>
<p><a href="http://sitegale.com/user_ajax.rar">Download The Files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=52</wfw:commentRss>
		</item>
		<item>
		<title>New php tutorial: Create a membership system with OOP</title>
		<link>http://sitegale.com/?p=48</link>
		<comments>http://sitegale.com/?p=48#comments</comments>
		<pubDate>Thu, 08 Jan 2009 19:03:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP and Mysql]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=48</guid>
		<description><![CDATA[In this tutorial you will learn how to create a membership system using OOP styled PHP (classes). You will learn many different techniques in this tutorial which will apply to making a variety of different applications and systems with php. If you have any questions about this tutorial, or need some help then please write [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial you will learn how to create a membership system using OOP styled PHP (classes). You will learn many different techniques in this tutorial which will apply to making a variety of different applications and systems with php. If you have any questions about this tutorial, or need some help then please write a comment. The source files will be available for download at the end of the tutorial.<br />
<span id="more-48"></span><br />
Firstly, you need a testing server to test your files on. If you do not have a web host, then I would recommend <a href="http://www.apachefriends.org/en/xampp.html">xampp</a>, a free solution that installs apache, mysql, php and other similar packages onto your computer in a easy to use package. Once you have done this, or found a web host, you&#8217;re ready to start!</p>
<h2><strong>Step 1) Creating the tables</strong></h2>
<p>In your phpmyadmin run this piece of sql code to install the user tables that we will use to store in our database. If you need more help in sql files, please search google or post for help at the bottom :).</p>
<p><code><br />
CREATE TABLE  `users` (<br />
`id` INT( 27 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,<br />
`username` VARCHAR( 255 ) NOT NULL ,<br />
`password` VARCHAR( 255 ) NOT NULL ,<br />
`email` VARCHAR( 255 ) NOT NULL ,<br />
`website` VARCHAR( 255 ) NOT NULL ,<br />
`user_status` VARCHAR( 255 ) NOT NULL DEFAULT  '1',<br />
`last_login` VARCHAR( 255 ) NOT NULL<br />
) ENGINE = MYISAM<br />
</code></p>
<h3><strong>Step 2) Creating the classes</strong></h3>
<p>In this step, we will create the initial classes for the membership system. These are the &#8216;backend&#8217; of this application and store all the functions that we need. They can be called again and again which is why classes are so useful. It also speeds up your page time, compared to having normal functions in your page, and is more organized.</p>
<p>Create a new file called &#8216;class.config.php&#8217; (without the quotes) and save it in a new folder called includes. This file will contain all of the connection information for the mysql database. Without this file, our application will not be able to connect to the database.</p>
<p>Insert this into the class.config.php file</p>
<p><code>&lt;?php<br />
class database // Creates a new database class<br />
{<br />
function connect()  // Creates a new connect function<br />
{<br />
}<br />
}<br />
?&gt;<br />
</code></p>
<p>This is the basic structure of your config file. As you can see, at the start we start the php code, then we create a class called database, then we create the function inside the database class called connect. In this function we will place the connection information to the database.</p>
<p>Insert this code into your connect function (Between the function connect() { and the other }).</p>
<p><code><br />
$sql = mysql_connect('yourdatabasename','yourhost','yourpassword'); // Replace these with your database user, pass and host<br />
if(!$sql)<br />
{<br />
exit('Error: Database connection is not working'); // If it goes wrong<br />
}<br />
$db = mysql_select_db('databasename'); // Selects the database. Replace databasename with your database name.<br />
if(!$db)<br />
{<br />
exit('Error: Couldnt connect to the database!'); // If it doesn't work.<br />
}<br />
</code></p>
<p>Replace the information in the mysql_connect and mysql_select_db with your own connection information. If you do not know your connection information, please ask your administrator or your webhost. There is a detailed guide on mysql information <a href="http://uk.php.net/function.mysql-connect">Here</a>.</p>
<p>Save this file and create a new file inside the includes folder again called &#8216;class.security.php&#8217;. This file will hold al the basic security functions that you will need for your simple OOP application. Of course, you can add more security to your application, but I am showing you a basic version of a finished membership system.</p>
<p>Insert this into your class.security.php file.</p>
<p><code><br />
&lt;?php<br />
class secure<br />
{<br />
function secure_string($string)<br />
{<br />
}<br />
function encrypt_string($string)<br />
{<br />
}<br />
}<br />
?&gt;<br />
</code></p>
<p>This, again is your basic structure for your security file. Again you have the class secure and this time you have two functions. Encrypt_string and secure_string. Insert this code (below) into the secure string function (between the function secure_string($string) { and the }).</p>
<p><code><br />
$string = htmlspecialchars(strip_tags(addslashes(mysql_real_escape_string($string))));<br />
return $string;<br />
</code></p>
<p>This will strip any unwanted scripts and hacks from our application that could cause a potential disaster. Hackers will usually try and use a sql injection or a xss injection to gain control of your application. This function rules out both of them.</p>
<p>Now insert the following code into the encrypt_string  function.</p>
<p><code><br />
$string = md5($string);<br />
return $string;<br />
</code></p>
<p>This will encrypt the string in a md5 encryption, and returns the $string. This will prevent people seeing passwords and other data that you don&#8217;t wish people to see. This will make our membership system that little bit more secure.</p>
<p>Now create a new file called class.user.php. This file will contain all the user commands that we need in our membership application. Stuff such as add user, update user, logout user, login user. This will be a big chunk of code, so I&#8217;ll try and explain it as we go along.</p>
<p>Insert this bit of code into your class.user.php.</p>
<blockquote><p>&lt;?php</p>
<p>class user  // Creates a new class called &#8216;user&#8217;</p>
<p>{</p>
<p>function adduser($username,$password,$email,$website) // Creates a new adduser class</p>
<p><span> </span>{</p>
<p><span> </span> $result = mysql_query(&#8221;SELECT * FROM users&#8221;); // Selects all from the user table</p>
<p><span> </span>$row = mysql_fetch_array($result);</p>
<p><span> </span></p>
<p><span> </span> if(empty($_POST['username'])||empty($_POST['password'])||empty($_POST['email'])||empty($_POST['website']))</p>
<p><span> </span>{</p>
<p><span> </span> echo &#8220;You left some required fields, please fill them in.&#8221;; // If fields are empty, then returns with this echo</p>
<p><span> </span>}</p>
<p><span> </span>else</p>
<p><span> </span>{</p>
<p><span> </span> $query = mysql_query(&#8221;SELECT COUNT(id) FROM users</p>
<p>WHERE username = &#8216;&#8221; . $username . &#8220;&#8216;</p>
<p>OR email = &#8216;&#8221; . $email . &#8220;&#8216; &#8220;) or die(mysql_error());</p>
<p>list($count) = mysql_fetch_row($query);</p>
<p>if($count != 0)</p>
<p><span> </span>{</p>
<p>echo &#8220;That username/email has already been taken!&#8221;;</p>
<p><span> </span>}</p>
<p><span> </span>else</p>
<p><span> </span>{</p>
<p><span> </span> if (!ereg(&#8221;^[^@]{1,64}@[^@]{1,255}$&#8221;, $email))</p>
<p><span> </span>{</p>
<p><span> </span> echo &#8220;You proved an invalid email format, Please try again.&#8221;;</p>
<p><span> </span>}</p>
<p><span> </span>else</p>
<p><span> </span>{</p>
<p><span> </span> $sql=&#8221;INSERT INTO users (id, username, password, email,website) VALUES      (&#8217;null&#8217;,'$username&#8217;,'$password&#8217;,'$email&#8217;,'$website&#8217;)&#8221;;</p>
<p>if (!mysql_query($sql))</p>
<p>{</p>
<p>die(&#8217;Error: &#8216; . mysql_error());</p>
<p>}</p>
<p><span> </span> else</p>
<p><span> </span> {</p>
<p><span> </span> echo &#8220;You may now login!&#8221;;</p>
<p><span> </span> }</p>
<p><span> </span>}</p>
<p><span> </span>}</p>
<p><span> </span> }</p></blockquote>
<p><span> </span>}</p>
<p>This is the adduser function which we will use later in our registration file. This contains all the information and validation needed for our registration file, so, if you like, it is the core of our registration.</p>
<p>Next, insert this bit of code into your class.user.php.</p>
<blockquote><p>function loginuser($username,$password)</p>
<p><span> </span>{</p>
<p><span> </span> $query = mysql_query(&#8221;SELECT id FROM users</p>
<p>WHERE username = &#8216;&#8221; . $username . &#8220;&#8216;</p>
<p>AND password = &#8216;&#8221; . $password . &#8220;&#8216;</p>
<p>&#8220;) or die(mysql_error());</p>
<p>list($user_id) = mysql_fetch_row($query);</p>
<p><span> </span>$row = mysql_fetch_array($query);</p>
<p>if(empty($user_id))</p>
<p><span> </span>{</p>
<p>echo &#8216;No combination of username and password found.&#8217;;</p>
<p>}</p>
<p><span> </span>else</p>
<p><span> </span>{</p>
<p><span> </span> echo &#8220;You are now logged in!&#8221;;</p>
<p><span> </span>echo &#8216;&lt;script type=&#8221;text/javascript&#8221;&gt;window.location=&#8221;index.php&#8221;&lt;/script&gt;&#8217;;</p>
<p><span> </span>$_SESSION['logged_in']=true;</p>
<p><span> </span>$_SESSION['username']=$username;</p>
<p><span> </span>$_SESSION['id']=$user_id['id'];</p>
<p><span> </span>$_SESSION['last_login']=$row['last_login'];</p>
<p><span> </span>$date = date(&#8217;Y/M/D&#8217;);</p>
<p><span> </span>mysql_query(&#8221;UPDATE users SET last_login = &#8216;&#8221;.$date.&#8221;&#8216; WHERE username = &#8216;&#8221;.$username.&#8221;&#8216; &#8220;);</p>
<p><span> </span></p>
<p><span> </span></p>
<p>}</p>
<p><span> </span>}</p></blockquote>
<p>This is our loginuser function which we will (obviously) use to login the user. It also validates and checks if the user exists. A pretty neat function eh? Well, now we have both the user login and register functions we need a edituser function so the user can edit their details.</p>
<p>Insert this bit of code into the class.user.php file again.</p>
<blockquote><p><span> </span>function updateuser($password,$email,$website)</p>
<p><span> </span>{</p>
<p><span> </span> if(empty($_POST['password'])||empty($_POST['email'])||empty($_POST['website']))</p>
<p><span> </span>{</p>
<p><span> </span> echo &#8220;Please fill in all the values!&#8221;;</p>
<p><span> </span>}</p>
<p><span> </span>else</p>
<p><span> </span>{</p>
<p><span> </span> $sql=&#8221;UPDATE users SET password=&#8217;$password&#8217;, email=&#8217;$email&#8217;, website=&#8217;$website&#8217;&#8221; ;</p>
<p>if (!mysql_query($sql))</p>
<p>{</p>
<p>die(&#8217;Error: &#8216; . mysql_error());</p>
<p>}</p>
<p><span> </span> else</p>
<p><span> </span> {</p>
<p><span> </span> echo &#8220;Profile updated&#8221;;</p>
<p><span> </span> }</p>
<p><span> </span> }</p></blockquote>
<p><span> </span>}</p>
<p>This is our editprofile function, and as you can see it uses the MYSQL update function to update the mysql tables and verifys whether the user has filled in all of the fields. And finially insert this last function into our class.user.php file. It is the logout function.<br />
<code> function logoutuser()<br />
{<br />
session_destroy();<br />
}}<br />
?&gt;</code></p>
<p>Now for our final and last class, the utilities class. When you come to build onto this membership system, you can add all the extra little functions in here to keep them all organized. Create a file called class.utilities.php and insert the following code into it.</p>
<blockquote><p>&lt;?php</p>
<p>class utility</p>
<p>{</p>
<p>function redirect($place)</p>
<p><span> </span>{</p>
<p><span> </span> echo &#8216;&lt;script type=&#8221;text/javascript&#8221;&gt;window.location=&#8221;&#8216;.$place.&#8217;&#8221;&lt;/script&gt;&#8217;;</p>
<p><span> </span>}</p>
<p>}</p></blockquote>
<p>?&gt;</p>
<p>This is just a javascript redirect, instead of the header function of php. (We don&#8217;t want to duplicate the header information).</p>
<h2>Step 3) The files</h2>
<p>Create a new file called index.php. This is the place where it will show links depending whether the user is logged in or not. It will use sessions (More secure than cookies) to test whether the user is logged in or not.</p>
<blockquote><p><span style="font-family: -webkit-monospace;">&lt;?php</span></p>
<p>session_start(); // Starts the session</p>
<p>include(&#8217;includes/class.security.php&#8217;); // Includes the security class</p>
<p>include(&#8217;includes/class.user.php&#8217;); // Includes the user class</p>
<p>include(&#8217;includes/class.config.php&#8217;); // Includes the config class</p>
<p>include(&#8217;includes/class.utilities.php&#8217;); // Includes the utilities class</p>
<p>$con = new database; // Creates a new class</p>
<p>$con-&gt;connect(); // Connects to the database</p>
<p>?&gt;</p>
<p>&lt;a href=&#8221;index.php&#8221;&gt;Index&lt;/a&gt; | &lt;?php if($_SESSION['logged_in']==true) // Checks whether user has logged in</p>
<p>{?&gt;</p>
<p>&lt;a href=&#8217;logout.php&#8217;&gt;Logout [&lt;?php echo $_SESSION['username'];?&gt;]&lt;/a&gt; | &lt;a href=&#8217;editprofile.php&#8217;&gt;Edit Profile&lt;/a&gt; |</p>
<p>&lt;?php</p>
<p>}else{</p>
<p>?&gt;</p>
<p>&lt;a href=&#8217;login.php&#8217;&gt;Login&lt;/a&gt; | &lt;a href=&#8217;register.php&#8217;&gt;Register&lt;/a&gt;</p>
<p>&lt;?php</p>
<p>}</p></blockquote>
<p>?&gt;&lt;br /&gt;</p>
<p>This is our index.php file. It has several php codes to check whether the user is logged in or not, and to show certain links if they are/aren&#8217;t logged in. You can use this simple structure to create a complex layout depending on if the user is logged in or not! <img src='http://sitegale.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Next, create a new file called login.php and place the following code inside it.</p>
<blockquote><p>&lt;?php</p>
<p>session_start(); // Starts the session</p>
<p>include(&#8217;includes/class.security.php&#8217;); // Includes the security class</p>
<p>include(&#8217;includes/class.user.php&#8217;); // Includes the user class</p>
<p>include(&#8217;includes/class.config.php&#8217;); // Includes the config class</p>
<p>include(&#8217;includes/class.utilities.php&#8217;); // Includes the utilities class</p>
<p>$con = new database; // Creates a new class</p>
<p>$con-&gt;connect(); // Connects to the database</p>
<p>$utility = new utility; // Creates a new utility</p>
<p>if($_SESSION['logged_in']==true) // Checks whether the user is logged in</p>
<p>{</p>
<p><span> </span>$utility-&gt;redirect(&#8217;index.php&#8217;); // If so, redirects them to the index.php</p>
<p>}</p>
<p>if(isset($_POST['login'])) // If Login is submitted</p>
<p>{</p>
<p>$secure = new secure; // Creates a new secure</p>
<p>$user_info[0] = $secure-&gt;secure_string($_POST['username']); // Secures the username</p>
<p>$user_info[1] = $secure-&gt;secure_string($_POST['password']); // Secures the password</p>
<p><span> </span>$user_info[1] = $secure-&gt;encrypt_string($user_info[1]); // Encrypts the password</p>
<p>$user = new user;  // Connects to the user class</p>
<p>$adduser = $user-&gt;loginuser($user_info[0],$user_info[1]); // Checks whether the user exists using the function loginuser</p>
<p>}</p>
<p>?&gt;</p>
<p>&lt;!&#8211; START OF HTML FORM &#8211;&gt;</p>
<p>&lt;form action=&#8221;login.php&#8221; method=&#8221;post&#8221; enctype=&#8221;multipart/form-data&#8221;&gt;</p>
<p>&lt;p&gt;</p>
<p>&lt;input type=&#8221;text&#8221; name=&#8221;username&#8221; value=&#8221;username&#8221; AUTOCOMPLETE=&#8221;off&#8221;/&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;p&gt;</p>
<p>&lt;input type=&#8221;password&#8221; name=&#8221;password&#8221; value=&#8221;password&#8221; AUTOCOMPLETE=&#8221;off&#8221;/&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;label&gt;</p>
<p>&lt;input type=&#8221;submit&#8221; name=&#8221;login&#8221; id=&#8221;login&#8221; value=&#8221;Submit&#8221; /&gt;</p>
<p>&lt;/label&gt;</p>
<p>&lt;/form&gt;</p>
<p>&lt;!&#8211; END OF HTML FORM &#8211;&gt;</p></blockquote>
<p>This login.php uses forms to get the data from the user, then checks if the user exists using the class we created earlier. You can add extra functions to this login file, such as live validation uqite easily using our class files. You will, however have to write a simple ajax script though. There will be a tutorial on that in the near future ;).</p>
<p>Next, create a file called logout.php. This file (obviously) logs out the user using the logout function we created in the user class earlier. It just destroys the session that is created when the user logs in. Add this code to login.php and save it.</p>
<blockquote>
<div>
<p>&lt;?php</p>
<p>session_start();</p>
<p>include(&#8217;includes/class.user.php&#8217;);</p>
<p>include(&#8217;includes/class.utilities.php&#8217;);</p>
<p>$user = new user;</p>
<p>$user-&gt;logoutuser();</p>
<p>$utility = new utility;</p>
<p>$utility-&gt;redirect(&#8217;index.php&#8217;) or die(&#8217;Error.&#8217;);?&gt;</p></div>
</blockquote>
<p>This is our logout.php file. As you can see, it is fairly simple. We use the class.user.php file and the class.utilities.php file that we created earlier.</p>
<p>Create a new file called register.php. This will be the page where the user can register to your membership application. This is one of the most crucial files in our membership system, allowing the users to create a new account so they can login and manage their profile.</p>
<p>Add the following code to register.php and save it. As you can see, I&#8217;ve commented the php so you have an idea what&#8217;s going on.</p>
<blockquote>
<div>
<p>&lt;?php</p>
<p>session_start(); // Starts the session</p>
<p>include(&#8217;includes/class.security.php&#8217;); // Includes the security class</p>
<p>include(&#8217;includes/class.user.php&#8217;); // Includes the user class</p>
<p>include(&#8217;includes/class.config.php&#8217;); // Includes the config class</p>
<p>include(&#8217;includes/class.utilities.php&#8217;); // Includes the utilities class</p>
<p>$con = new database; // Creates a new class</p>
<p>$con-&gt;connect(); // Connects to the database</p>
<p>if($_SESSION['logged_in']==true) // Checks whether the user is logged in or not</p>
<p>{</p>
<p>$utility = new utility;  // Creates a new utility</p>
<p>$utility-&gt;redirect(&#8217;index.php&#8217;) or die(&#8217;Error.&#8217;);  // Redirects to the index if they are logged in</p>
<p>}</p>
<p>if(isset($_POST['register'])) // If register is posted</p>
<p>{</p>
<p>$secure = new secure; // Connects with the secure class</p>
<p>$user_info[0] = $secure-&gt;secure_string($_POST['username']); // Secures the username</p>
<p>$user_info[1] = $secure-&gt;secure_string($_POST['password']); // Secures the password</p>
<p>$user_info[1] = $secure-&gt;encrypt_string($user_info[1]); // Encrypts the password</p>
<p>$user_info[2] = $secure-&gt;secure_string($_POST['email']); // Secures the email</p>
<p>$user_info[3] = $secure-&gt;secure_string($_POST['website']); // Secures the website</p>
<p>$user = new user; // Connects with the user function</p>
<p>$adduser = $user-&gt;adduser($user_info[0],$user_info[1],$user_info[2],$user_info[3]);  // Adds the new user</p>
<p>}</p>
<p>?&gt;</p>
<p>&lt;!&#8211; START OF HTML FORM &#8211;&gt;</p>
<p>&lt;form action=&#8221;register.php&#8221; method=&#8221;post&#8221; enctype=&#8221;multipart/form-data&#8221;&gt;</p>
<p>&lt;p&gt;</p>
<p>Username:</p>
<p>&lt;input name=&#8221;username&#8221; type=&#8221;text&#8221; id=&#8221;username&#8221; value=&#8221;&lt;?php echo $user_info[0];?&gt;&#8221; AUTOCOMPLETE=&#8221;off&#8221;/&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;p&gt;</p>
<p>Password:</p>
<p>&lt;input name=&#8221;password&#8221; type=&#8221;password&#8221; value=&#8221;&lt;?php echo $_POST['password'];?&gt;&#8221; AUTOCOMPLETE=&#8221;off&#8221;/&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;p&gt;</p>
<p>Email:</p>
<p>&lt;input name=&#8221;email&#8221; type=&#8221;text&#8221; value=&#8221;&lt;?php echo $user_info[2];?&gt;&#8221; AUTOCOMPLETE=&#8221;off&#8221;/&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;p&gt;</p>
<p>Website:</p>
<p>&lt;input name=&#8221;website&#8221; type=&#8221;text&#8221; value=&#8221;&lt;?php echo $user_info[3];?&gt;&#8221; /&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;label&gt;</p>
<p>&lt;input type=&#8221;submit&#8221; name=&#8221;register&#8221; id=&#8221;register&#8221; value=&#8221;Submit&#8221; /&gt;</p>
<p>&lt;/label&gt;</p>
<p>&lt;/form&gt;</p>
<p>&lt;!&#8211; END OF HTML FORM &#8211;&gt;</p></div>
</blockquote>
<p>Now, for our final file create a file called editprofile.php. This will be where our user can edit their profile using the function we created earlier in the user class. It will check if they have filled in all of the forms and then use mysql&#8217;s update function to update their profile. Add the following code to editprofile.php and save it.</p>
<blockquote>
<div>
<p>&lt;?php</p>
<p>session_start(); // Starts the session</p>
<p>include(&#8217;includes/class.security.php&#8217;); // Includes the security class</p>
<p>include(&#8217;includes/class.user.php&#8217;); // Includes the user class</p>
<p>include(&#8217;includes/class.config.php&#8217;); // Includes the config class</p>
<p>include(&#8217;includes/class.utilities.php&#8217;); // Includes the utilities class</p>
<p>$con = new database; // Creates a new class</p>
<p>$con-&gt;connect(); // Connects to the database</p>
<p>if($_SESSION['logged_in']==!true) // Checks whether the user is logged in or not</p>
<p>{</p>
<p>$utility = new utility;  // Creates a new utility</p>
<p>$utility-&gt;redirect(&#8217;index.php&#8217;) or die(&#8217;Error.&#8217;);  // Redirects to the index if they are logged in</p>
<p>}</p>
<p>$result = mysql_query(&#8221;SELECT * FROM users&#8221;); // Selects the results from users</p>
<p>$row = mysql_fetch_array($result); // Assignss the mysql_result to a variable</p>
<p>if(isset($_POST['editprofile'])) // If form is submitted</p>
<p>{</p>
<p>$secure = new secure; // Connects with the secure class</p>
<p>$user_info[0] = $secure-&gt;secure_string($_POST['password']); // Secures the password</p>
<p>$user_info[0] = $secure-&gt;encrypt_string($user_info[0]); // Encrypts the password</p>
<p>$user_info[1] = $secure-&gt;secure_string($_POST['email']); // Secures the email</p>
<p>$user_info[2] = $secure-&gt;secure_string($_POST['website']); // Secures the website</p>
<p>$user = new user; // Connects with the user class</p>
<p>$adduser = $user-&gt;updateuser($user_info[0],$user_info[1],$user_info[2]); // Adds a new user</p>
<p>}</p>
<p>?&gt;</p>
<p>&lt;!&#8211; START OF HTML FORM &#8211;&gt;</p>
<p>&lt;form action=&#8221;editprofile.php&#8221; method=&#8221;post&#8221; enctype=&#8221;multipart/form-data&#8221;&gt;</p>
<p>&lt;p&gt;</p>
<p>&lt;input type=&#8221;text&#8221; disabled name=&#8221;password&#8221; value=&#8221;&lt;?php echo $_SESSION['username']?&gt;&#8221; /&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;p&gt;</p>
<p>Password: &lt;input type=&#8221;password&#8221; name=&#8221;password&#8221; value=&#8221;" /&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;p&gt;</p>
<p>Email: &lt;input type=&#8221;text&#8221; name=&#8221;email&#8221; value=&#8221;&lt;? echo $row['email']; ?&gt;&#8221; /&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;p&gt;</p>
<p>Website: &lt;input type=&#8221;text&#8221; name=&#8221;website&#8221; value=&#8221;&lt;? echo $row['website']; ?&gt;&#8221; /&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;label&gt;</p>
<p>&lt;input type=&#8221;submit&#8221; name=&#8221;editprofile&#8221; id=&#8221;login&#8221; value=&#8221;Submit&#8221; /&gt;</p>
<p>&lt;/label&gt;</p>
<p>&lt;/form&gt;</p>
<p>&lt;!&#8211; END OF HTML FORM &#8211;&gt;</p></div>
</blockquote>
<p>As you can see, I have commented this file so it is easy for you understand.</p>
<p>And with that last file, it ends this tutorial on how to create a membership system using OOP style php. If you have any questions or improvements on this tutorial, then please leave a comment (below). Thank You for reading this tutorial! Keep viewing sitegale.com for new unique tutorials. If you wish to download all the files used in this tutorial, they are available for download using the following link.</p>
<p><a href="http://www.sitegale.com/membership_system.rar">Download The Files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=48</wfw:commentRss>
		</item>
		<item>
		<title>Welcome to the new version of sitegale!</title>
		<link>http://sitegale.com/?p=45</link>
		<comments>http://sitegale.com/?p=45#comments</comments>
		<pubDate>Thu, 08 Jan 2009 19:00:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Site Updates]]></category>

		<guid isPermaLink="false">http://sitegale.com/?p=45</guid>
		<description><![CDATA[Hello and welcome to the new version of sitegale! Expect a new skin, new unique tutorials and much more in the following weeks. We will release 3 or more unique tutorials each week, so keep your eyes peeled ;). Well, not literially peeled but you can guess what I meant.
If you have any suggestions on [...]]]></description>
			<content:encoded><![CDATA[<p>Hello and welcome to the new version of sitegale! Expect a new skin, new unique tutorials and much more in the following weeks. We will release 3 or more unique tutorials each week, so keep your eyes peeled ;). Well, not literially peeled but you can guess what I meant.</p>
<p>If you have any suggestions on how to improve the service here at sitegale, then please don&#8217;t hesitate to ask us some questions. Just drop us a line at: ezia-work@hotmail.co.uk.</p>
<p>Thankyou very much!</p>
]]></content:encoded>
			<wfw:commentRss>http://sitegale.com/?feed=rss2&amp;p=45</wfw:commentRss>
		</item>
	</channel>
</rss>

