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

<channel>
	<title>Jimi Sulaiman &#187; Uncategorized</title>
	<atom:link href="http://www.jimisulaiman.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jimisulaiman.com</link>
	<description>Online Portfolio</description>
	<lastBuildDate>Sat, 10 Sep 2011 00:20:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Using Ajax to validate form</title>
		<link>http://www.jimisulaiman.com/2010/02/using-ajax-to-validate-form/</link>
		<comments>http://www.jimisulaiman.com/2010/02/using-ajax-to-validate-form/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 18:53:52 +0000</pubDate>
		<dc:creator>Jimi Sulaiman</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Source Files]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MySql]]></category>

		<guid isPermaLink="false">http://www.jimisulaiman.com/?p=475</guid>
		<description><![CDATA[There are times where you need to validate a form to a data stored in a database without the need to submit the form beforehand. The solution - Ajax (shorthand for asynchronous JavaScript and XML). For example, you are creating a user registration form where obviously, the username to choose from needs to be unique. Instead of validating the username after form submission, wouldn&#8217;t it be much friendlier if the form can validate itself  from the server asynchronously in the background from a simple event such as on submit or unfocus event? In this post, I will be showing how you can the validate with Ajax using PHP/MySQL as your back-end. A table called user is created in the MySQL database which contains some dummy usernames.  When user enters a username existed from this table, the form will prompt an error with message &#8220;Username already taken. Please try a different username.&#8221; What you need: - jQuery 1.4, my favourite javascript library. Click here to download - jQuery plugin, Validation 1.6. Click here to download - PHP and mySQL enabled web server (for this example, I&#8217;m using PHP 5 and MySQL 5) You&#8217;ll gonna need two files: - form.php &#60; this will be your form - check_username.php &#60; this will check  if data exist in the user table in your MySQL database Link jQuery and the plugin to the form page first.  You can refer to the source file(link at the bottom of this post) if you are not clear on how to do this.  Then add the javascript code below and you&#8217;re done on this page. I&#8217;ve commented the code below to explain what each line does.  I&#8217;m not gonna touch on the Validation plugin here but if you are interested, you can view its Documentation available from the download site. $(document).ready(function() { $(&#34;#myform&#34;).validate(); //apply the validation plugin to your form $(&#34;#username&#34;).rules(&#34;add&#34;, { remote: { url: &#34;check_username.php&#34;, //place the PHP here type: &#34;post&#34;, //using the post method to send data (you may also use the get method) data: { username: function() { return $(&#34;#username&#34;).val(); //get the value from the text input } } }, messages: { remote: &#34;Username already taken. Please try a different username.&#34; //set the message you want to display } }); }); The next step is to create the PHP page that checks if the user existed.  Because the validation only works with Boolean values,  so you will need to code the page to return the text true if username doesn&#8217;t exist or false otherwise.  Here is the search Query in PHP for this example. $query=&#34;SELECT * FROM users WHERE LOWER(username) = '$username'&#34;; $result=mysql_query($query); $num=mysql_num_rows($result); //check if number of users with the username exist more than 0 if($num &#62;0){ echo &#34;false&#34;; }else{ echo &#34;true&#34;; } Test the form by typing any username that has already existed, your form should be showing an error message next to the username input as shown in the demo below. Click here to view live demo Get the complete source file:]]></description>
		<wfw:commentRss>http://www.jimisulaiman.com/2010/02/using-ajax-to-validate-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My First DSLR Camera</title>
		<link>http://www.jimisulaiman.com/2009/07/my-first-dslr-camera/</link>
		<comments>http://www.jimisulaiman.com/2009/07/my-first-dslr-camera/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 16:22:20 +0000</pubDate>
		<dc:creator>Jimi Sulaiman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Nikon D5000]]></category>

		<guid isPermaLink="false">http://www.brudigital.com/?p=297</guid>
		<description><![CDATA[I&#8217;ve been wanting to upgrade from the point and shoot camera to a DSLR  (entry level at least)  and finally managed to buy one a few days ago - A Nikon D5000. Being denial for a few years that my point and shoot camera can achieves what a DSLR can do(I photoshop alot) but on the day I&#8217;ve got my hands on it, I was totally blown away! It was like having a new sets of color or brushes to paint on a bigger canvas! I don&#8217;t have time to go out and put on extensive tests with the camera yet but here&#8217;s a few shots I that I did so far. All pictures below were taken using 18-55mm f/3.5-5.6G VR Lens (kit lens) &#8211; since this is the only lens I&#8217;ve got for now, I don&#8217;t expect to achieve the best results from these tests. None of these images were photoshopped. Focus Test Using Natural Light Source Macro Test Miscellaneous]]></description>
		<wfw:commentRss>http://www.jimisulaiman.com/2009/07/my-first-dslr-camera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retiring from Freelancing</title>
		<link>http://www.jimisulaiman.com/2009/03/retiring-from-freelancing/</link>
		<comments>http://www.jimisulaiman.com/2009/03/retiring-from-freelancing/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 15:43:44 +0000</pubDate>
		<dc:creator>Jimi Sulaiman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brudigital.com/?p=279</guid>
		<description><![CDATA[After 6 years of freelancing on website design and development, I have come to a point where I feel that I&#8217;ve reached my goal. During these years, I honestly can say that its not worth the money (it can&#8217;t really pays the bill), but the experiences and knowledges earned were priceless and personally rewarding. I&#8217;m not ditching any of my current clients, I&#8217;m just gonna stop doing new projects thats all. My next project will be something that I want to do, that challenges me, and that is exciting and new - It doesn&#8217;t has to be IT stuff. It could be painting or cooking or designing as long as I get to be the one who is &#8216;in charge&#8217;, someone who desides things this time.]]></description>
		<wfw:commentRss>http://www.jimisulaiman.com/2009/03/retiring-from-freelancing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Islamic Chinese Calligraphy</title>
		<link>http://www.jimisulaiman.com/2008/08/islamic-chinese-calligraphy/</link>
		<comments>http://www.jimisulaiman.com/2008/08/islamic-chinese-calligraphy/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 12:30:06 +0000</pubDate>
		<dc:creator>Jimi Sulaiman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[calligraphy]]></category>
		<category><![CDATA[chinese]]></category>
		<category><![CDATA[islamic]]></category>

		<guid isPermaLink="false">http://www.brudigital.com/?p=145</guid>
		<description><![CDATA[We&#8217;ve purchased this today from the calligrapher himself. Its amazing :) more about the calligrapher (link updated)]]></description>
		<wfw:commentRss>http://www.jimisulaiman.com/2008/08/islamic-chinese-calligraphy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

