<?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>Smart Tutorials - PHP, MySQL, Jquery, JavaScriptSmart Tutorials - PHP, MySQL, Jquery, JavaScript</title>
	<atom:link href="http://www.smarttutorials.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smarttutorials.net</link>
	<description></description>
	<lastBuildDate>Tue, 18 Jun 2013 18:32:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<!--Theme by MyThemeShop.com-->
		<item>
		<title>Smart Tutorials Demo Page</title>
		<link>http://www.smarttutorials.net/smart-tutorials-demo-page/</link>
		<comments>http://www.smarttutorials.net/smart-tutorials-demo-page/#comments</comments>
		<pubDate>Mon, 17 Jun 2013 18:09:11 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[blog demo page]]></category>
		<category><![CDATA[php post demo page]]></category>
		<category><![CDATA[Smart Tutorials Demo Page]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13892</guid>
		<description><![CDATA[In this tutorial we are going to see how to make demo page like one in my blog. Having special demo page for all the post you had written, esp. helps your site users to see all your work in one place. That greatly improves your site users interest that inturn generates greater traffic to [...]]]></description>
				<content:encoded><![CDATA[<p>In this tutorial we are going to see how to make<a title="Smart Tutorials Demo Page" href="http://demo.smarttutorials.net/demo/" target="_blank"> demo page like one in my blog</a>. Having special demo page for all the post you had written, esp. helps your site users to see all your work in one place. That greatly improves your site users interest that inturn generates greater traffic to your site. Nearlye half of traffic to my site generated through my demo page.</p>
<p>This is very small php application that you can do it yourself, all you have to need is just follow this tutorial step by step. If you have felt any difficulty while implementing this leave your comment in the comment box.</p>
<div id="attachment_11316" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/demo_page/" target="_blank"><img class="size-full wp-image-11316" title="Smart Tutorials Demo Page" alt="Smart Tutorials Demo Page" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live1.png" width="75" height="75" /></a><p class="wp-caption-text">Front End Demo</p></div>
<div id="attachment_11316" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/demo_page/post.php" target="_blank"><img class="size-full wp-image-11316" title="Smart Tutorials Demo Page" alt="Smart Tutorials Demo Page" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live1.png" width="75" height="75" /></a><p class="wp-caption-text">Back End Demo</p></div>
<div id="attachment_13895" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/06/smart-tutorials-demo-page.png" rel="lightbox[13892]" title="Smart Tutorials Demo Page"><img class="size-full wp-image-13895" alt="Smart Tutorials Demo Page" src="http://www.smarttutorials.net/wp-content/uploads/2013/06/smart-tutorials-demo-page.png" width="700" height="300" /></a><p class="wp-caption-text">Smart Tutorials Demo Page</p></div>
<p>Step 1:</p>
<p>Create a demo table with the following SQL query.</p><pre class="crayon-plain-tag">CREATE TABLE IF NOT EXISTS `demo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `post_title` varchar(150) NOT NULL,
  `post_url` varchar(150) NOT NULL,
  `post_demo` varchar(100) NOT NULL,
  `download_link` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;</pre><p><div id="attachment_12916" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=19" target="_blank"><img class="size-full wp-image-12916" title="Smart Tutorials Demo Page" alt="Smart Tutorials Demo Page" src="http://www.smarttutorials.net/wp-content/uploads/2012/04/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div></p>
<p>Step 2:</p>
<p>Now insert following sample data&#8217;s in the demo table.</p><pre class="crayon-plain-tag">INSERT INTO `demo` (`id`, `post_title`, `post_url`, `post_demo`, `download_link`) VALUES
(1, 'Multi Stage HTML5 Form Using jQuery and CSS3', 'http://www.smarttutorials.net/multi-stage-html5-form-using-jquery-and-css3/', 'http://demo.smarttutorials.net/multi_form/', 'http://www.smarttutorials.net/subscribers.php?id=7'),
(2, 'jQuery Script to Disable Right Click And Control Save on your Site', 'http://www.smarttutorials.net/jquery-script-to-disable-right-click-and-control-save-on-your-site/', 'http://demo.smarttutorials.net/jquery_preventer/sample.html', 'http://demo.smarttutorials.net/jquery_preventer/sample.html'),
(3, 'Live Preview In jQuery', 'http://www.smarttutorials.net/live-preview-in-jquery/', 'http://smarttutorials.net/demo/live_preview.html', 'http://www.smarttutorials.net/subscribers.php?id=5'),
(4, 'Google URL Shortener API Service PHP Script', 'http://www.smarttutorials.net/google-url-shortener-api-service-php-script/', 'http://www.smarttutorials.net/demo/google_url_shortener.php', 'http://www.smarttutorials.net/subscribers.php?id=4'),
(5, 'Google Maps Reverse Geocoding API in PHP', 'http://www.smarttutorials.net/google-maps-reverse-geocoding-php/', 'http://www.smarttutorials.net/demo/reverse_geocode_api_google_maps.php', 'http://www.smarttutorials.net/subscribers.php?id=3'),
(6, 'Google maps Geocoding API using PHP', 'http://www.smarttutorials.net/google-maps-geocoding-api-using-php/', 'http://smarttutorials.net/demo/geocode.php', 'http://www.smarttutorials.net/subscribers.php?id=1'),
(7, 'Send Email with File Attachment (PDF, word files and images etc..) in PHP', 'http://www.smarttutorials.net/send-mail-with-file-attachemnt-php/', 'http://demo.smarttutorials.net/demo_mail/', 'http://www.smarttutorials.net/subscribers.php?id=6'),
(8, 'Send an E-Mail with Attachment Using jQuery, Ajax and PHP without Refrshing a Page', 'http://www.smarttutorials.net/send-an-e-mail-with-attachment-using-jquery-ajax-and-php-without-refrshing-a-page/', 'http://demo.smarttutorials.net/demo_ajax_mail/', 'http://www.smarttutorials.net/subscribers.php?id=9'),
(9, 'Multi Stage HTML5 Form Using jQuery, Ajax and CSS3 – PART 2', 'http://www.smarttutorials.net/multi-stage-html5-form-using-jquery-ajax-and-css3-part-2/', 'http://demo.smarttutorials.net/multi_form_part2/', 'http://www.smarttutorials.net/subscribers.php?id=8'),
(10, 'Autocomplete Using jQuery, Ajax, PHP and MySQL', 'http://www.smarttutorials.net/autocomplete-using-jquery-ajax-php-and-mysql/', 'http://demo.smarttutorials.net/auto_complete/', 'http://www.smarttutorials.net/subscribers.php?id=10'),
(11, 'Quiz application Using PHP, jQuery, Ajax, MySQL and HTML5', 'http://www.smarttutorials.net/quiz-application-using-php-jquery-ajax-mysql-and-html5/', 'http://demo.smarttutorials.net/Quiz/', 'http://www.smarttutorials.net/subscribers.php?id=12'),
(12, 'Dynamically Add and Remove Textbox Using jQuery', 'http://www.smarttutorials.net/dynamically-add-and-remove-textbox-using-jquery/', 'http://demo.smarttutorials.net/dynamic_textbox/', 'http://www.smarttutorials.net/subscribers.php?id=13'),
(13, 'Multi-Step SignUp Form Using jQuery, Ajax, PHP, HTML5 and CSS3', 'http://www.smarttutorials.net/multi-step-signup-form-using-jquery-ajax-php-html5-and-css3/', 'http://demo.smarttutorials.net/signup_form/', 'http://www.smarttutorials.net/subscribers.php?id=15'),
(14, 'Unique jQuery Validation Success Message Using jQuery Validation Plugin', 'http://www.smarttutorials.net/unique-jquery-validation-success-message-using-jquery-validation-plugin/', 'http://demo.smarttutorials.net/unique_success/', 'http://www.smarttutorials.net/subscribers.php?id=16'),
(15, 'Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP', 'http://www.smarttutorials.net/unique-email-validation-based-on-checkbox-using-jquery-validation-plugin-custom-methods-ajax-and-php/', 'http://demo.smarttutorials.net/remote_validation/', 'http://www.smarttutorials.net/subscribers.php?id=17'),
(16, 'Dynamically Add or Remove Table Row Using jQuery', 'http://www.smarttutorials.net/dynamically-add-or-remove-table-row-using-jquery/', 'http://demo.smarttutorials.net/table/', 'http://www.smarttutorials.net/subscribers.php?id=18');</pre><p>Step 3:</p>
<p>Now create config.php file to keep database connection in a separate file, that prevents repetition  of database connection codes.</p><pre class="crayon-plain-tag">&lt;?php
/*
Author : muni, Smart tutorials
*/
define('DB_HOST', 'localhost');
define('DB_NAME', 'YOUR DB NAME');
define('DB_USER','YOUR DB USER NAME');
define('DB_PASSWORD','YOUR DB PASSWORD');

$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error());
$db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_error());
?&gt;</pre><p>Step 4:</p>
<p>Now create post.php file, that gets your input data and stores in a database table. Create a form with the following fields.</p><pre class="crayon-plain-tag">&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Post ADD&lt;/title&gt;

&lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'&gt;&lt;/script&gt;
&lt;script src='http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js'&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;p&gt;Post Add Page&lt;/p&gt;
&lt;div class='main'&gt;

&lt;div id='message'&gt;
     &lt;img id='close' src='images/close.png'/&gt;
     &lt;span&gt;Data Updated Successfully!&lt;/span&gt;
	 &lt;br/&gt;
     &lt;span&gt;We will be in touch soon.&lt;/span&gt;
     &lt;img id='checkmark' src='images/check.png'/&gt;
&lt;/div&gt;

&lt;form id='post_add' method='post' action='post_add.php'&gt;
	&lt;table&gt;
		 &lt;tr&gt;
			&lt;td&gt;&lt;textarea id="post_title" name="post_title" placeholder='Eneter Post Title Here' class='txt'&gt;&lt;/textarea&gt;&lt;/td&gt;
			&lt;td class="status"&gt;&lt;/td&gt;
		 &lt;/tr&gt;
		 &lt;tr&gt;
			&lt;td&gt;&lt;textarea id="post_url" name="post_url" placeholder='Eneter Post URL Here' class='txt'&gt;&lt;/textarea&gt;&lt;/td&gt;
			&lt;td class="status"&gt;&lt;/td&gt;
		 &lt;/tr&gt;
		 &lt;tr&gt;
			&lt;td&gt;&lt;textarea  id="demo_url" name="demo_url" placeholder='Eneter Post Demo URL' class='txt'&gt;&lt;/textarea&gt;&lt;/td&gt;
			&lt;td class="status"&gt;&lt;/td&gt;
		 &lt;/tr&gt;
		 &lt;tr&gt;
			&lt;td&gt;&lt;textarea  id="download_link" name="download_link" placeholder='Eneter Post Download link Here' class='txt'&gt;&lt;/textarea&gt;&lt;/td&gt;
			&lt;td class="status"&gt;&lt;/td&gt;
		 &lt;/tr&gt;
		 &lt;tr&gt;
			&lt;td colspan='2'&gt;
				&lt;input type='submit' name='submit' value='submit' id='submit_btn' class='but'/&gt;
			&lt;/td&gt;
		 &lt;/tr&gt;
	&lt;/table&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;</pre><p>Step 5:</p>
<p>Now add following css style and jQuery validation script to post.php file.</p><pre class="crayon-plain-tag">&lt;style&gt;
.error{color:red;}
.main{width:600px; margin:0px auto;}
table{margin-left:100px;}
@font-face{font-family: Lobster;src: url('Lobster.otf');}
body{width:750px;margin:0px auto;}
.space{margin-bottom: 4px;}
.txt{width:400px;height:100px;border:1px solid #00BB64;border-radius:3px;color:#999;margin-bottom:5px;}
p,span{font-family: Lobster;font-size:35px;text-align:center;}
.but{width:270px;background:#00BB64;border:1px solid #00BB64;height:40px;border-radius:3px;color:white;margin-top:10px;margin-left: 72px;}
em.error {background:url("unchecked.gif") no-repeat 0px 0px;padding-left: 16px;color: #ff0000;font-weight: bold;}
em.success {background:url("checked.gif") no-repeat 0px 0px;padding-left: 16px;color: #33ff55 !important;}
span{color:orange;}
.hide{display:none;}
#message{display:none;margin-top: 100px;color: #fff;width: 400px;height: 133px;border: 2px solid #00BB64;background-color:#00BB64;border-radius: 10px;position: relative;}
#message span{text-align: center;font-size:30px;color:#fff;padding-left:38px;}
#message #checkmark{margin-left: 170px;}
#close{position: absolute;right: -8px;top: -10px;}
&lt;/style&gt;</pre><p>jQuery Script :</p><pre class="crayon-plain-tag">&lt;script&gt;
   (function($) { 
       $("#post_add").validate({
				   submitHandler: function(form) {

						var dataString = $("form").serialize();  		
						$.ajax({  
						  type: "POST",  
						  url: "show.php",  
						  data: dataString,  
						  success: function(msg) {	
							alert(msg);
							$('#post_add').addClass('hide');
							$("#message").show();
						  }  
						});  
						return false;  
					},
			     rules: {
					post_title: {
					   required: true,
					   minlength : 10
					},
					post_url: {
					   required: true,
					   minlength : 10
					},	
					demo_url: {
					   required: true,
					   minlength : 20
					},
					download_link: {
					   required: true,
					   minlength : 20
					}

			     },
			     messages: {
						post_title: {
						   required:"Please enter Post Title Here",
						   minlength: "Please enter a minimun 10 chars"
						},
						post_url: {
						   required:"Please enter Post URL Here",
						   minlength: "Please enter a minimun 10 chars"
						},
						demo_url: {
						   required:"Please enter Demo URL Here",
						   minlength: "Please enter a minimun 20 chars"
						},
						download_link: {
						   required:"Please enter Download Link Here",
						   minlength: "Please enter a minimun 20 chars"
						}
			     },
				 debug: true,
				 errorElement: "em",
				 errorContainer: $("#warning, #summary"),
				 errorPlacement: function(error, element) {
					error.appendTo( element.parent("td").next("td") );
				 },
				 success: function(label) {
					label.text("ok!").addClass("success");
				 }
		});		
         $('#close').click(function(){ 
			  $('#message').hide();
			  $("#post_add").removeClass("hide");
			  $('textarea').val('');
			  location.reload();
	    });		
   })(jQuery);

&lt;/script&gt;</pre><p>Step 6:</p>
<p>Now create show.php file, which gets the posted data and updates the database table.</p><pre class="crayon-plain-tag">&lt;?php
/*
Author : muni, Smart tutorials
*/
require_once 'config.php';

$post_title=$_POST['post_title'];
$post_url=$_POST['post_url'];
$demo_url=$_POST['demo_url'];
$download_link=$_POST['download_link'];

$query="INSERT INTO demo (post_title,post_url,post_demo,download_link)
VALUES ('$post_title','$post_url','$demo_url','$download_link')";
echo "$query";
$response=mysql_query($query);
echo $response;

?&gt;</pre><p>Step 7:</p>
<p>Finally front end development, now create index.php file with the following table structure.</p><pre class="crayon-plain-tag">&lt;?php require_once 'config.php';?&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
     &lt;title&gt;Post Demo Page&lt;/title&gt;
     &lt;meta charset='utf-8'&gt;
     &lt;link href='http://fonts.googleapis.com/css?family=Lobster+Two:700' rel='stylesheet' type='text/css'&gt;
     &lt;link rel='stylesheet' href='css/style.css'&gt;

&lt;/head&gt;
&lt;body&gt;
    &lt;a href='http://www.smarttutorials.net/' id='home'&gt;
	&lt;h2&gt; Back Home !&lt;/h2&gt;
	&lt;/a&gt;
    &lt;h1&gt;Post Demo Page&lt;/h1&gt;
    &lt;div class='outer'&gt;
       &lt;table&gt;
           &lt;tr&gt;
              &lt;th&gt;Post Title&lt;/th&gt;
              &lt;th&gt;Demo&lt;/th&gt;
              &lt;th&gt;Download Link&lt;/th&gt;
           &lt;/tr&gt;
           &lt;?php  $result=mysql_query('SELECT * FROM demo ORDER BY id DESC');
           while($response=mysql_fetch_array($result)){
           ?&gt;
           &lt;tr&gt;
              &lt;td class='post align'&gt;&lt;a href='&lt;?php echo $response['post_url'];?&gt;' target="_blank"&gt;&lt;?php echo $response['post_title'];?&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td class='post align1'&gt;&lt;a href='&lt;?php echo $response['post_demo'];?&gt;' target="_blank"&gt;Demo&lt;/a&gt;&lt;/td&gt;
              &lt;td class='post align1'&gt;&lt;a href='&lt;?php echo $response['download_link'];?&gt;' target="_blank"&gt;Download Link&lt;/a&gt;&lt;/td&gt;
           &lt;/tr&gt;
           &lt;?php } ?&gt;
       &lt;/table&gt;

    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/smart-tutorials-demo-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamically Add or Remove Table Row Using jQuery</title>
		<link>http://www.smarttutorials.net/dynamically-add-or-remove-table-row-using-jquery/</link>
		<comments>http://www.smarttutorials.net/dynamically-add-or-remove-table-row-using-jquery/#comments</comments>
		<pubDate>Sun, 09 Jun 2013 05:19:14 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[check all checkbox in jquery]]></category>
		<category><![CDATA[Dynamically Add or Remove Table Row Using jQuery]]></category>
		<category><![CDATA[jQuery add or remove table row with checkbox]]></category>
		<category><![CDATA[select all checkboxes using jquery in table]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13803</guid>
		<description><![CDATA[Dynamically Add or Remove Table Row Using jQuery is very helpful in number of places where teachers wants to update students marks details or admin wants to update their Users details. This is very simple to make it yourself just follow this tutorial step by step. If you came across any difficulty implementing this just [...]]]></description>
				<content:encoded><![CDATA[<p>Dynamically Add or Remove Table Row Using jQuery is very helpful in number of places where teachers wants to update students marks details or admin wants to update their Users details. This is very simple to make it yourself just follow this tutorial step by step. If you came across any difficulty implementing this just leave your comments in the comment box.</p>
<div id="attachment_11316" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/table/" target="_blank"><img class="size-full wp-image-11316" title="Dynamically Add or Remove Table Row Using jQuery" alt="Dynamically Add or Remove Table Row Using jQuery" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live1.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<div id="attachment_13806" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/06/jquery-add-remove-table-row-dynamically-with-checkbox-functionality.png" rel="lightbox[13803]" title="jquery add remove table row dynamically with checkbox functionality"><img class="size-full wp-image-13806" title="jquery add remove table row dynamically with checkbox functionality" alt="jquery add remove table row dynamically with checkbox functionality" src="http://www.smarttutorials.net/wp-content/uploads/2013/06/jquery-add-remove-table-row-dynamically-with-checkbox-functionality.png" width="700" height="300" /></a><p class="wp-caption-text">Dynamically Add or Remove Table Row Using jQuery</p></div>
<p>Step 1:</p>
<p>Create index.php file with following html skelton structure.</p><pre class="crayon-plain-tag">&lt;!DOCTYPE html&gt; 
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;jquery add remove table row dynamically with checkbox functionality&lt;/title&gt;
	&lt;meta charset='utf-8'&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>&nbsp;</p>
<div id="attachment_12487" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=18" target="_blank"><img class="size-full wp-image-12487" title="Dynamically Add or Remove Table Row Using jQuery" alt="Dynamically Add or Remove Table Row Using jQuery" src="http://www.smarttutorials.net/wp-content/uploads/2013/03/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div>
<p>Step 2:</p>
<p>Now add a html form in the body section, and inside form create a table like in the below html.</p><pre class="crayon-plain-tag">&lt;form id='students' method='post' name='students' action='index.php'&gt;

		&lt;table border="1" cellspacing="0"&gt;
		  &lt;tr&gt;
			&lt;th&gt;&lt;input class='check_all' type='checkbox' onclick="select_all()"/&gt;&lt;/th&gt;
			&lt;th&gt;S. No&lt;/th&gt;
			&lt;th&gt;First Name&lt;/th&gt;
			&lt;th&gt;Last Name&lt;/th&gt;
			&lt;th&gt;Tamil&lt;/th&gt;
			&lt;th&gt;English&lt;/th&gt;
			&lt;th&gt;Computer&lt;/th&gt;
			&lt;th&gt;Total&lt;/th&gt;
		  &lt;/tr&gt;
		  &lt;tr&gt;
			&lt;td&gt;&lt;input type='checkbox' class='case'/&gt;&lt;/td&gt;
			&lt;td&gt;1.&lt;/td&gt;
			&lt;td&gt;&lt;input type='text' id='first_name' name='first_name[]'/&gt;&lt;/td&gt;
			&lt;td&gt;&lt;input type='text' id='last_name' name='last_name[]'/&gt;&lt;/td&gt;
			&lt;td&gt;&lt;input type='text' id='tamil' name='tamil[]'/&gt;&lt;/td&gt;
			&lt;td&gt;&lt;input type='text' id='english' name='english[]'/&gt; &lt;/td&gt;
			&lt;td&gt;&lt;input type='text' id='computer' name='computer[]'/&gt;&lt;/td&gt;
			&lt;td&gt;&lt;input type='text' id='total' name='total[]'/&gt; &lt;/td&gt;
		  &lt;/tr&gt;
		&lt;/table&gt;

		&lt;button type="button" class='delete'&gt;- Delete&lt;/button&gt;
		&lt;button type="button" class='addmore'&gt;+ Add More&lt;/button&gt;
		&lt;p&gt;
		&lt;input type='submit' name='submit' value='submit' class='but'/&gt;&lt;/p&gt;
	&lt;/form&gt;</pre><p>Step 3:</p>
<p>Now add the following CSS stylling in the head section of the index.php file.</p><pre class="crayon-plain-tag">&lt;style&gt;
	@font-face{font-family: Lobster;src: url('Lobster.otf');}
	h1{font-family: Lobster;text-align:center;}
	table{border-collapse:collapse;border-radius:25px;width:880px;}
	table, td, th{border:1px solid #00BB64;}
	tr,input{height:30px;border:1px solid #fff;}
	input{text-align:center;}
	input:focus{border:1px solid yellow;} 
	.space{margin-bottom: 2px;}
	#container{margin-left:210px;}
	.but{width:270px;background:#00BB64;border:1px solid #00BB64;height:40px;border-radius:3px;color:white;margin-top:10px;margin:0px 0px 0px 290px;}
&lt;/style&gt;</pre><p>Step 4:</p>
<p>Now add jQuery library file in the head section or bottom of html file wherever you like.</p><pre class="crayon-plain-tag">&lt;script src='jquery-1.9.1.min.js'&gt;&lt;/script&gt;</pre><p>Step 5:</p>
<p>Here is the jQuery script that will add/append new table row when user clicked on addMore button.</p><pre class="crayon-plain-tag">&lt;script&gt;
var i=2;
$(".addmore").on('click',function(){
    var data="&lt;tr&gt;&lt;td&gt;&lt;input type='checkbox' class='case'/&gt;&lt;/td&gt;&lt;td&gt;"+i+".&lt;/td&gt;";
    data +="&lt;td&gt;&lt;input type='text' id='first_name"+i+"' name='first_name[]'/&gt;&lt;/td&gt; &lt;td&gt;&lt;input type='text' id='last_name"+i+"' name='last_name[]'/&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='text' id='tamil"+i+"' name='tamil[]'/&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='text' id='english"+i+"' name='english[]'/&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='text' id='computer"+i+"' name='computer[]'/&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='text' id='total"+i+"' name='total[]'/&gt;&lt;/td&gt;&lt;/tr&gt;";
	$('table').append(data);
	i++;
});
&lt;/script&gt;</pre><p>Step 6:</p>
<p>Following jQuery script will deletes/removes the selected table rows from the table when user clicked on Delete button. When clicked on delete button following script will check for slected table rows and finally deletes the selected table rows.</p><pre class="crayon-plain-tag">&lt;script&gt;
$(".delete").on('click', function() {
	$('.case:checkbox:checked').parents("tr").remove();

});
&lt;/script&gt;</pre><p>Step 7:</p>
<p>Following jQuery script helps you to select all the table rows in the table.</p><pre class="crayon-plain-tag">&lt;script&gt;
function select_all() {
	$('input[class=case]:checkbox').each(function(){ 
		if($('input[class=check_all]:checkbox:checked').length == 0){ 
			$(this).prop("checked", false); 
		} else {
			$(this).prop("checked", true); 
		} 
	});
}

&lt;/script&gt;</pre><p>Feel free to refer one of my previous tutorial on <a title="Dynamically Add and Remove Textbox Using jQuery" href="http://www.smarttutorials.net/dynamically-add-and-remove-textbox-using-jquery/" target="_blank">Dynamically Add and Remove Textbox Using jQuery.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/dynamically-add-or-remove-table-row-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP</title>
		<link>http://www.smarttutorials.net/unique-email-validation-based-on-checkbox-using-jquery-validation-plugin-custom-methods-ajax-and-php/</link>
		<comments>http://www.smarttutorials.net/unique-email-validation-based-on-checkbox-using-jquery-validation-plugin-custom-methods-ajax-and-php/#comments</comments>
		<pubDate>Mon, 03 Jun 2013 18:02:13 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Unique Email Validation on Based Checkbox Using jQuery Validation Plugin Custom Methods Ajax and PHP]]></category>
		<category><![CDATA[unique email validation using jquery and php]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13790</guid>
		<description><![CDATA[There is sometime we have requirement like this based on the User (Premium User or Guest User) We want to check Email or Username uniqueness. This is done with the help of  jQuery Validation Plugin Custom Methods, Ajax and PHP. This tutorial is continuation of my previous tutorial on Live Username and Email Availability Checking using PHP, jQuery and [...]]]></description>
				<content:encoded><![CDATA[<p>There is sometime we have requirement like this based on the User (Premium User or Guest User) We want to check Email or Username uniqueness. This is done with the help of  jQuery Validation Plugin Custom Methods, Ajax and PHP. This tutorial is continuation of my previous tutorial on <a title="Live Username and Email Availability Checking using PHP, jQuery and Ajax" href="http://www.smarttutorials.net/live-username-and-email-availability-checking-using-php-jquery-and-ajax/" target="_blank">Live Username and Email Availability Checking using PHP, jQuery and Ajax</a>.</p>
<div id="attachment_11316" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/remote_validation/" target="_blank"><img class="size-full wp-image-11316" title="Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP" alt="Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live1.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<p>&nbsp;</p>
<div id="attachment_13791" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/06/unique-email-validation-based-on-checkbox-using-jquery-validation-plugin.png" rel="lightbox[13790]" title="Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP"><img class="size-full wp-image-13791" alt="Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP" src="http://www.smarttutorials.net/wp-content/uploads/2013/06/unique-email-validation-based-on-checkbox-using-jquery-validation-plugin.png" width="700" height="300" /></a><p class="wp-caption-text">Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP</p></div>
<p>Step 1:</p>
<p>Create sample MySQL table using following sql query.</p><pre class="crayon-plain-tag">CREATE TABLE IF NOT EXISTS `test` ( 
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;</pre><p>Now add some sample data&#8217;s in the table using following SQL Query.</p><pre class="crayon-plain-tag">INSERT INTO `test` (`id`, `email`) VALUES
(1, 'muni2explore@gmail.com'),
(2, 'sasi@gmail.com');</pre><p><div id="attachment_12487" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=17" target="_blank"><img class="size-full wp-image-12487" title="Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP" alt="Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP" src="http://www.smarttutorials.net/wp-content/uploads/2013/03/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div></p>
<p>Step 2:</p>
<p>Create config.php file to keep databse connection information in a separate file, so that we can use same file multiple times without rewriting the same information again and again.</p><pre class="crayon-plain-tag">&lt;?php
define('DB_HOST', 'localhost');
define('DB_NAME', 'test');
define('DB_USER','root');
define('DB_PASSWORD','');

$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error());
$db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_error());

?&gt;</pre><p>Step 3:</p>
<p>Now create index.php file and add HTML form with radios buttons and textboxes using following html code.</p><pre class="crayon-plain-tag">&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;

&lt;title&gt;Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP&lt;/title&gt;
&lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'&gt;&lt;/script&gt;
&lt;script src='http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js'&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Unique Email Validation Based on Checkbox Using jQuery Validation Plugin Custom Methods, Ajax and PHP&lt;/p&gt;
&lt;div class='main'&gt;
&lt;form id='mailForm' method='post' action='index.php'&gt;
	&lt;table&gt;
		 &lt;tr&gt;
			&lt;td colspan='2'&gt; 
			    &lt;input type="radio" id='email_chk' name="email_chk" value="email_chk"&gt;Premium User
	            &lt;input type="radio" id='email_no' name="email_chk" value="email_chk_no"&gt;Guest User
			&lt;/td&gt;
		 &lt;/tr&gt;
		 &lt;tr&gt;
			&lt;td&gt;&lt;input type='text' name='email' id='email' class='txt'/&gt;&lt;/td&gt;
			&lt;td class="status"&gt;&lt;/td&gt;
		 &lt;/tr&gt;
		 &lt;tr&gt;
			&lt;td colspan='2'&gt;
				&lt;input type='submit' name='submit' value='submit' class='but'/&gt;
			&lt;/td&gt;
		 &lt;/tr&gt;
	&lt;/table&gt;
&lt;/form&gt;

&lt;p&gt; Following Email : &lt;span&gt;muni2explore@gmail.com&lt;/span&gt; is already exists in database. Enter this email in the textbox to check.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>Step 4:</p>
<p>Add the following CSS styles in the head section of the index.php file.</p><pre class="crayon-plain-tag">&lt;style&gt;
.error{color:red;}
body{width:100%;}
p{font-family: Lobster;font-size:35px;text-align:center;}
@font-face{font-family: Lobster;src: url('Lobster.otf');}
.main{width:500px; margin:0px auto;}
.but{width:270px;background:#00BB64;border:1px solid #00BB64;height:40px;border-radius:3px;color:white;margin-top:10px;}
.txt{width:270px;border:1px solid #00BB64;height:30px;border-radius:3px;color:#00BB64;margin-bottom:5px;}
.success{color:#00BB64;}
em.error {background:url("unchecked.gif") no-repeat 0px 0px;padding-left: 16px;color: #ff0000;font-weight: bold;}
em.success {background:url("checked.gif") no-repeat 0px 0px;padding-left: 16px;color: #33ff55 !important;}
span{color:orange;}
form{padding-left:100px;}
&lt;/style&gt;</pre><p>Step 4:</p>
<p>Here jQuery validation script, this script only checks the user entered email is in the right format or not. If it is not in right format then it will asks user to enter right formatted Email.</p><pre class="crayon-plain-tag">&lt;script&gt;
   $('document').ready(function(){
       $("#mailForm").validate({
			     rules: {

					email:{ 
					   required: true,
					   email: true,
					   uniqueEmail: true
					}
			     },
			     messages: {

						email:{ 
						   required: "Please enter your email",
						   email: "Please enter a valid email address",
						   uniqueEmail: "Email is already exists"
						}
			     },
				debug: true,
				errorElement: "em",
				errorContainer: $("#warning, #summary"),
				errorPlacement: function(error, element) {
					error.appendTo( element.parent("td").next("td") );
				},
				success: function(label) {
					label.text("ok!").addClass("success");
				}
		});		 
   });
&lt;/script&gt;</pre><p>Step 5:</p>
<p>Now I am going write jQuery Validation Plugin custom method with ajax call to check email uniqueness. The script will get information about radiobox selected and email entered in the textbox and sends those information to PHP file through jQuery .ajax() method. Where it will checks against emails in the database.</p><pre class="crayon-plain-tag">jQuery.validator.addMethod("uniqueEmail", function(value, element) {
    var response;
	var email_chk;
	if ($('#email_chk').is(':checked')) {
		email_chk=$('#email_chk').val();
	}else{
	    email_chk='No';
	}

	var email=$('#email').val();
    $.ajax({
        type: "POST",
        url: "unique_email.php",
        data:{email_chk:email_chk,email:email},
        async:false,
        success:function(data){
            response = data;
        }
    });
    if(response == 'true')
    {
        return true;
    }
    else
    {
        return false;
    }

}, "Email is Already Taken");</pre><p>Step 7:</p>
<p>Finally create unique_email.php file that will gets email entered by the user and compares this email with the emails in the database and finally returns results to the jQuery .ajax() call.</p><pre class="crayon-plain-tag">&lt;?php
require_once 'config.php';

$flag=$_POST['email_chk'];
$email=$_POST['email'];

if($flag=='email_chk'){
	  $query="select count(email) from user where email='$email'";
	   $response=mysql_query($query);
	   $result=mysql_fetch_array($response);
	   if($result[0]&gt;0){
		  echo 'false';
	   }
	   else{
		 echo 'true';
	   }
}
else{
    echo 'true';
}

?&gt;</pre><p>If Email already in the database then PHP file return false as response to jQuery .ajax() call , so jQuery won&#8217;t allows your form to submit.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/unique-email-validation-based-on-checkbox-using-jquery-validation-plugin-custom-methods-ajax-and-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unique jQuery Validation Success Message Using jQuery Validation Plugin</title>
		<link>http://www.smarttutorials.net/unique-jquery-validation-success-message-using-jquery-validation-plugin/</link>
		<comments>http://www.smarttutorials.net/unique-jquery-validation-success-message-using-jquery-validation-plugin/#comments</comments>
		<pubDate>Sat, 01 Jun 2013 18:23:33 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[form validation using jquery]]></category>
		<category><![CDATA[html5 form validation using jQuery validation plugin]]></category>
		<category><![CDATA[jquery validation plugin demo]]></category>
		<category><![CDATA[Unique jQuery Validation Success Message Using jQuery Validation Plugin]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13772</guid>
		<description><![CDATA[Imagine moments like this, when we are doing something in our life, there is someone who appreciates every work we do. This type of appreciation always boost our energy and happiness. This tutorial on Unique jQuery Validation Success Message Using jQuery Validation Plugin is some type appreciation you are giving to your visitors when they [...]]]></description>
				<content:encoded><![CDATA[<p>Imagine moments like this, when we are doing something in our life, there is someone who appreciates every work we do. This type of appreciation always boost our energy and happiness. This tutorial on Unique jQuery Validation Success Message Using jQuery Validation Plugin is some type appreciation you are giving to your visitors when they entering their information in your site.</p>
<p>Just follow this tutorial step by step to implement this. In this tutorial I am using same interface I have used in my previous tutorial on <a title="Send an E-Mail with Attachment Using jQuery, Ajax and PHP without Refrshing a Page" href="http://www.smarttutorials.net/send-an-e-mail-with-attachment-using-jquery-ajax-and-php-without-refrshing-a-page/" target="_blank">Send an E-Mail with Attachment Using jQuery, Ajax and PHP without Refrshing a Page</a>. I had clearly explained HTML and css part implementation on this tutorial  (<a title="Send an E-Mail with Attachment Using jQuery, Ajax and PHP without Refrshing a Page" href="http://www.smarttutorials.net/send-an-e-mail-with-attachment-using-jquery-ajax-and-php-without-refrshing-a-page/" target="_blank">Send an E-Mail with Attachment Using jQuery, Ajax and PHP without Refrshing a Page</a>) . Please refer those part in my previous tutorial.</p>
<p>We are going to see in this tutorial only Unique jQuery Validation Success Message implementation part.</p>
<div id="attachment_11316" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/unique_success/" target="_blank"><img class="size-full wp-image-11316" title="Unique jQuery Validation Success Message Using jQuery Validation Plugin " alt="Unique jQuery Validation Success Message Using jQuery Validation Plugin " src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live1.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<div id="attachment_13773" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/06/unique-jquery-validation-success-message-using-jquery-validation-plugin.png" rel="lightbox[13772]" title="Unique jQuery Validation Success Message Using jQuery Validation Plugin "><img class="size-full wp-image-13773" alt="Unique jQuery Validation Success Message Using jQuery Validation Plugin " src="http://www.smarttutorials.net/wp-content/uploads/2013/06/unique-jquery-validation-success-message-using-jquery-validation-plugin.png" width="700" height="300" /></a><p class="wp-caption-text">Unique jQuery Validation Success Message Using jQuery Validation Plugin</p></div>
<p>&nbsp;</p>
<p>Step 1:</p>
<p>Add the following jQuery libary files in your index.php file.</p><pre class="crayon-plain-tag">&lt;script src="js/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
&lt;script src="js/jquery.validate.min.js"&gt;&lt;/script&gt;</pre><p><div id="attachment_12916" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=16" target="_blank"><img class="size-full wp-image-12916" title="Unique jQuery Validation Success Message Using jQuery Validation Plugin " alt="Unique jQuery Validation Success Message Using jQuery Validation Plugin " src="http://www.smarttutorials.net/wp-content/uploads/2012/04/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div></p>
<p>Step 2:</p>
<p>Here is the jQuery validation script.</p><pre class="crayon-plain-tag">$("#mailForm").validate({
			     rules: {
					name: {
					   required: true,
					   minlength : 3
					},
					email:{ 
					   required: true,
					   email: true
					},
					phone: { 
					  required : true,
					  number:true,	
					  minlength : 10,
				      maxlength : 11
					},
					image: "required",
					message: "required",
					femail:{ 
					   required: true,
					   email: true
					}
			     },
			     messages: {
						name: {
						   required:"Please enter your name",
						   minlength: "Please enter a valid name"
						},
						email:{ 
						   required: "Please enter your email",
						   minlength: "Please enter a valid email address",
						},
						phone: { 
						   required: "Please enter your phone number",
						   minlength: "Please enter your valid phone number",
						   maxlength: "Please enter your valid phone number"
						},
						image: "Please Choose your image",
						message: "Please enter your message",
						femail: { 
						   required: "Please enter your email",
						   minlength: "Please enter a valid email address",
						}
			     },
			     debug: true,
				 errorElement: "em",
				 errorContainer: $("#warning, #summary"),
				 errorPlacement: function(error, element) {
					error.appendTo( element.parent("td").next("td") );
				 },

				 success: function(label) {
					var messages = new Array(
						"That's Great!",
						"Looks good!",
						"You got it!",
						"Great Job!",
						"Smart!",
						"That's it!"
                    );
					var num = Math.floor(Math.random()*6); 

					label.text(messages[num]).addClass("success");

				}

			 });</pre><p>Here i have selected the form that we are going validate now with it&#8217;s unique id <em>$(&#8220;#mailForm&#8221;) </em>name in jQuery and then selected each fields in the form with it&#8217;s unique id&#8217;s and applied validation in the rules section and in the message i have specified error unique messages.</p>
<p>Step 3:</p>
<p>Here comes hero part.</p>
<p>When users entered correct information in the form fields following unique success messages will be displayed that boost your users interest in your site.</p><pre class="crayon-plain-tag">success: function(label) {
       var messages = new Array(
			"That's Great!",
			"Looks good!",
			"You got it!",
			"Great Job!",
			"Smart!",
			"That's it!"
       );
var num = Math.floor(Math.random()*6); 					
label.text(messages[num]).addClass("success");					
}</pre><p>Based random number genereated using Math random() method, messages in the messages array will be displayed.</p><pre class="crayon-plain-tag">var num = Math.floor(Math.random()*6);</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/unique-jquery-validation-success-message-using-jquery-validation-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi-Step SignUp Form Using jQuery, Ajax, PHP, HTML5 and CSS3</title>
		<link>http://www.smarttutorials.net/multi-step-signup-form-using-jquery-ajax-php-html5-and-css3/</link>
		<comments>http://www.smarttutorials.net/multi-step-signup-form-using-jquery-ajax-php-html5-and-css3/#comments</comments>
		<pubDate>Sat, 25 May 2013 18:29:33 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ajax HTML5 and CSS3]]></category>
		<category><![CDATA[Multi-Step SignUp Form Using jQuery]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13654</guid>
		<description><![CDATA[This type of form always improve user interaction on your site comparing very long form like this. Now we are going to see how to convert this very long form into multi-step signup using jQuery, Ajax,PHP, HTML5 and CSS3. Making of this Multi-Step SignUp Form is very very easy. Please refer my previous tutorial on [...]]]></description>
				<content:encoded><![CDATA[<p>This type of form always improve user interaction on your site comparing <a title="Long HTML5 Form" href="http://demo.smarttutorials.net/signup_form/demo.php" target="_blank">very long form like this</a>. Now we are going to see how to convert<a title="Long HTML5 Form" href="http://demo.smarttutorials.net/signup_form/demo.php" target="_blank"> this very long form</a> into multi-step signup using jQuery, Ajax,PHP, HTML5 and CSS3.</p>
<p>Making of this Multi-Step SignUp Form is very very easy.</p>
<div id="attachment_11316" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/signup_form/" target="_blank"><img class="size-full wp-image-11316" title="Multi Step Signup Form using  jQuery Ajax PHP HTML5 and css3" alt="Multi Step Signup Form using  jQuery Ajax PHP HTML5 and css3" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live1.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<div id="attachment_13657" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/05/multi-step-signup-form-using-jquery-html5-css3.png" rel="lightbox[13654]" title="Multi-Step SignUp Form Using jQuery, Ajax, PHP, HTML5 and CSS3"><img class="size-full wp-image-13657" alt="Multi Step Signup Form using  jQuery Ajax PHP HTML5 and css3" src="http://www.smarttutorials.net/wp-content/uploads/2013/05/multi-step-signup-form-using-jquery-html5-css3.png" width="700" height="300" /></a><p class="wp-caption-text">Multi-Step Signup Form using jQuery Ajax PHP HTML5 and css3</p></div>
<p>Please refer my previous tutorial on multi-step SignUp</p>
<p><a title="Multi Stage HTML5 Form Using jQuery, Ajax and CSS3 - Part2" href="http://www.smarttutorials.net/multi-stage-html5-form-using-jquery-ajax-and-css3-part-2/" target="_blank">Multi Stage HTML5 Form Using jQuery, Ajax and CSS3 &#8211; Part2</a></p>
<p><a title="Multi Stage HTML5 Form Using jQuery and CSS3" href="http://www.smarttutorials.net/multi-stage-html5-form-using-jquery-and-css3/" target="_blank">Multi Stage HTML5 Form Using jQuery and CSS3</a></p>
<p>&nbsp;</p>
<p>Step 1:</p>
<p>Create index.php file and adding numbers fieldset tags within form tag in the body section of html file. Where fieldsets  indicates numbers signup form steps.</p>
<p><div id="attachment_12916" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=15" target="_blank"><img class="size-full wp-image-12916" title="Multi Step Signup Form using  jQuery Ajax PHP HTML5 and css3" alt="Multi Step Signup Form using  jQuery Ajax PHP HTML5 and css3" src="http://www.smarttutorials.net/wp-content/uploads/2012/04/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div><br />
<pre class="crayon-plain-tag">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Multi-Step SignUp Form Using jQuery Ajax PHP HTML5 and CSS3&lt;/title	
&lt;/head&gt;
&lt;body&gt;
   &lt;form id='sample_form'&gt;
       &lt;fieldset&gt;
	      &lt;label&gt;Step 1&lt;/label&gt;
	   &lt;/fieldset&gt;
	   &lt;fieldset&gt;
	      &lt;label&gt;Step 2&lt;/label&gt;
	   &lt;/fieldset&gt;
	   &lt;fieldset&gt;
	      &lt;label&gt;Step 3&lt;/label&gt;
	   &lt;/fieldset&gt;
	   &lt;fieldset&gt;
	      &lt;label&gt;Step 4&lt;/label&gt;
	   &lt;/fieldset&gt;
   &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><br />
Step 2:</p>
<p>Now add following input fields between each fieldsets.</p><pre class="crayon-plain-tag">&lt;form action="index.php" id="myform" style="background-color:#FFFFFF;" title="Apply for a Short-Term Loan"&gt;
&lt;fieldset&gt;
&lt;div&gt;&lt;h2 class="title"&gt;You are just minutes away from approval.&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;label class="title"&gt;Amount&lt;/label&gt;
				&lt;select name="requested_amount" id='requested_amount' class='required border' min='100' max='1000' 
				data-msg-min="Please select minimum $100" data-msg-max="Please select maximum of $1000"&gt;
				&lt;option value="select"&gt;Select&lt;/option&gt;
				&lt;option value="100"&gt;100$&lt;/option&gt;

				&lt;option value="200"&gt;200$&lt;/option&gt;

				&lt;option value="300"&gt;300$&lt;/option&gt;

				&lt;option value="400"&gt;400$&lt;/option&gt;

				&lt;option value="500"&gt;500$+&lt;/option&gt;
			&lt;/select&gt;
			&lt;/div&gt;
			&lt;p id="invalid-requested_amount" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;
				&lt;label class="title"&gt;First Name&lt;/label&gt;
				&lt;input type="text" name="first_name" id='first_name' class='required' minlength="2" data-msg-required="Please enter your first name" maxlength='128'&gt;
			&lt;/div&gt;
			&lt;p id="invalid-first_name" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;
				&lt;label class="title"&gt;Last Name&lt;/label&gt;
				&lt;input type="text" name="last_name" id='last_name' class='required' minlength="2" data-msg-required="Please enter your last name" maxlength='128'&gt;
			&lt;/div&gt;
			&lt;p id="invalid-last_name" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;
				&lt;label class="title"&gt;Email Address&lt;/label&gt;
				&lt;input type="text" name="email" id='email' class='required email' data-msg-required="Please enter your email"&gt;
			&lt;/div&gt;
			&lt;p id="invalid-email" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;
				&lt;label class="title"&gt;Cell Phone&lt;/label&gt;
				&lt;input type="text" name="home_phone" id='home_phone' class='required' data-msg-required="Please enter your Cell Phone Number" phoneUS='true'&gt;
			&lt;/div&gt;
			&lt;p id="invalid-home_phone" class="error_msg"&gt;&lt;/p&gt;
&lt;/fieldset&gt;

&lt;fieldset&gt;
&lt;div&gt;&lt;h2 class="title"&gt;Required Secure Information&lt;/h2&gt;&lt;/div&gt;

&lt;div&gt;
&lt;label class="title"&gt;When were you born?&lt;/label&gt;
&lt;input type="text" name="birth_date" id='birth_date'&gt;
&lt;/div&gt;
&lt;p id="invalid-birth_date" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;
&lt;label class="title"&gt;Please enter your Social Security Number&lt;/label&gt;
&lt;input type="text" name="ssn" id='ssn'&gt;
&lt;/div&gt;
&lt;p id="invalid-ssn" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;
&lt;label class="title"&gt;What is your DL number?&lt;/label&gt;
&lt;input type="text" name="drivers_license_number" id='drivers_license_number'&gt;
&lt;/div&gt;
&lt;p id="invalid-drivers_license_number" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;
&lt;label class="title"&gt;Which state issued your DL?&lt;/label&gt;

				&lt;select name="drivers_license_state" id='drivers_license_state' class='border'&gt;
				&lt;option value=""&gt;Select&lt;/option&gt;
				&lt;option value="AL"&gt;AL&lt;/option&gt;

				&lt;option value="AK"&gt;AK&lt;/option&gt;

				&lt;option value="AZ"&gt;AZ&lt;/option&gt;

				&lt;option value="AR"&gt;AR&lt;/option&gt;

				&lt;option value="CA"&gt;CA&lt;/option&gt;

				&lt;option value="CO"&gt;CO&lt;/option&gt;

				&lt;option value="CT"&gt;CT&lt;/option&gt;

			&lt;/select&gt;

			&lt;/div&gt;
			&lt;p id="invalid-drivers_license_state" class="error_msg"&gt;&lt;/p&gt;
&lt;/fieldset&gt;

&lt;fieldset&gt;
&lt;div&gt;&lt;h2 class="title"&gt;Tell us about your job.&lt;/h2&gt;&lt;/div&gt;

&lt;div&gt;
&lt;label class="title"&gt;Your employer's company name.&lt;/label&gt;
&lt;input type="text" name="employer" id='employer'&gt;
&lt;/div&gt;
&lt;p id="invalid-employer" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;
&lt;label class="title"&gt;Employer's Phone Number&lt;/label&gt;
&lt;input type="text" name="employer_phone" id='employer_phone'&gt;
&lt;/div&gt;
&lt;p id="invalid-employer_phone" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;
&lt;label class="title"&gt;What's your title at work?&lt;/label&gt;
&lt;input type="text" name="job_title" id='job_title'&gt;
&lt;/div&gt;
&lt;p id="invalid-job_title" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;
&lt;label class="title"&gt;How many months have you been employed?&lt;/label&gt;
				&lt;select name="employer_months" id='employer_months' class='border'&gt;
				&lt;option value=""&gt;Select&lt;/option&gt;
				&lt;option value="1"&gt;1&lt;/option&gt;

				&lt;option value="2"&gt;2&lt;/option&gt;

				&lt;option value="6"&gt;6&lt;/option&gt;
			&lt;/select&gt;
			&lt;/div&gt;
			&lt;p id="invalid-employer_months" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;
			&lt;label class="title"&gt;Are you ACTIVE status in the military?&lt;/label&gt;
				&lt;div&gt;
				&lt;input type="checkbox" id='active_military' name="active_military" class='active_military' value="yes"&gt;&lt;span&gt;yes&lt;/span&gt;&lt;br&gt;

				&lt;input type="checkbox" name="active_military" class='active_military' value="no"&gt;&lt;span&gt;no&lt;/span&gt;&lt;br&gt;
			&lt;/div&gt;

			&lt;/div&gt;
			&lt;p id="invalid-active_military" class="error_msg"&gt;&lt;/p&gt;
&lt;/fieldset&gt;

&lt;fieldset&gt;
&lt;div&gt;&lt;h2 class="title"&gt;Almost Done...&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;label class="title"&gt;How much do you make a month?&lt;/label&gt;
				&lt;select name="monthly_income" id='monthly_income' class='border'&gt;
				&lt;option value=""&gt;Select&lt;/option&gt;
				&lt;option value="800"&gt;800&lt;/option&gt;

				&lt;option value="900"&gt;900&lt;/option&gt;

				&lt;option value="1000"&gt;1000&lt;/option&gt;

				&lt;option value="10000"&gt;10000&lt;/option&gt;
			&lt;/select&gt;
			&lt;/div&gt;
			&lt;p id="invalid-monthly_income" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;&lt;label class="title"&gt;Where does you income come from?&lt;/label&gt;
				&lt;select name="income_source" id='income_source' class='border'&gt;
				&lt;option value=""&gt;Select&lt;/option&gt;
				&lt;option value="EMPLOYMENT"&gt;EMPLOYMENT&lt;/option&gt;
				&lt;option value="BENEFITS"&gt;BENEFITS&lt;/option&gt;
			&lt;/select&gt;
			&lt;/div&gt;
			&lt;p id="invalid-income_source" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;&lt;label class="title"&gt;How often are you paid?&lt;/label&gt;
				&lt;select name="payment_frequency" id='payment_frequency' class='border'&gt;
				&lt;option value=""&gt;Select&lt;/option&gt;
				&lt;option value="WEEKLY"&gt;WEEKLY&lt;/option&gt;

				&lt;option value="BI-WEEKLY"&gt;BI-WEEKLY&lt;/option&gt;

				&lt;option value="MONTHLY"&gt;MONTHLY&lt;/option&gt;

				&lt;option value="BI-MONTHLY"&gt;BI-MONTHLY&lt;/option&gt;
			&lt;/select&gt;
			&lt;/div&gt;
			&lt;p id="invalid-payment_frequency" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;
			&lt;label class="title"&gt;When is your next pay date?&lt;/label&gt;
			&lt;input type="text" name="pay_date1" id='pay_date1'&gt;
			&lt;/div&gt;
			&lt;p id="invalid-pay_date1" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;
			&lt;label class="title"&gt;When is your 2nd pay date from now?&lt;/label&gt;
			&lt;input type="text" name="pay_date2" id='pay_date2'&gt;
			&lt;/div&gt;
			&lt;p id="invalid-pay_date2" class="error_msg"&gt;&lt;/p&gt;
&lt;/fieldset&gt;

&lt;fieldset&gt;
&lt;div&gt;&lt;h2 class="title"&gt;Congrats, it's the last step!&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;
&lt;label class="title"&gt;Bank Name&lt;/label&gt;
&lt;input type="text" name="bank_name" id='bank_name'&gt;
&lt;/div&gt;
&lt;p id="invalid-bank_name" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;&lt;label class="title"&gt;Routing Number&lt;/label&gt;
&lt;input type="text" name="bank_aba" id='bank_aba'&gt;
&lt;/div&gt;
&lt;p id="invalid-bank_aba" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;
&lt;label class="title"&gt;Account Number&lt;/label&gt;
&lt;input type="text" name="bank_account" id='bank_account'&gt;
&lt;/div&gt;
&lt;p id="invalid-bank_account" class="error_msg"&gt;&lt;/p&gt;
&lt;div&gt;
&lt;label class="title"&gt;What type of account do you have?&lt;/label&gt;
				&lt;select name="bank_type" id='bank_type' class='border'&gt;
				&lt;option value=""&gt;Select&lt;/option&gt;
				&lt;option value="CHECKING"&gt;CHECKING&lt;/option&gt;

				&lt;option value="SAVING"&gt;SAVING&lt;/option&gt;
			&lt;/select&gt;
			&lt;/div&gt;
			&lt;p id="invalid-bank_type" class="error_msg"&gt;&lt;/p&gt;
			&lt;div&gt;&lt;label class="title"&gt;Do you have direct deposit?&lt;/label&gt;
				&lt;div&gt;
				&lt;input type="checkbox" id='direct_deposit' name="direct_deposit" value="yes" class='direct_deposit'&gt;&lt;span&gt;yes&lt;/span&gt;&lt;br&gt;

				&lt;input type="checkbox" name="direct_deposit" value="no" class='direct_deposit'&gt;&lt;span&gt;no&lt;/span&gt;&lt;br&gt;
			&lt;/div&gt;
			&lt;/div&gt;
			&lt;p id="invalid-direct_deposit" class="error_msg"&gt;&lt;/p&gt;
&lt;/fieldset&gt;

&lt;input id="submit_app" class="sub" type="button" value="Submit" /&gt;

&lt;/form&gt;</pre><p>Step 3:</p>
<p>Now add following css styles in the head section of index.php page.</p><pre class="crayon-plain-tag">* {background-color: #16a085;margin: 0;padding: 0;}
		@font-face{font-family: Lobster;src: url('Lobster.otf');}
		h2{font-family: Lobster;font-size: 30px;}
        body { font-family:Lucida Sans, Arial, Helvetica, Sans-Serif; font-size:13px; margin:20px; width:100%;}
        #main { width:960px; margin: 0px auto; border:solid 1px #b2b3b5; -moz-border-radius:10px; padding:20px; background-color:#f6f6f6;}
        #header { text-align:center; border-bottom:solid 1px #b2b3b5; margin: 0 0 20px 0; }
        fieldset { border:none; width:320px;}
        legend { font-size:18px; margin:0px; padding:10px 0px; color:#b0232a; font-weight:bold;}
        label { display:block; margin:15px 0 5px;}
        input[type=text], input[type=password] { width:300px; padding:5px; border:solid 1px #fff;}
        .prev, .next { background-color:#b0232a; margin:20px 0;padding:5px 10px; color:#fff; text-decoration:none;}
        .prev:hover, .next:hover { background-color:#000; text-decoration:none;}
        .prev { float:left;}
        .next { float:right;}
        #steps { list-style:none; width:100%; overflow:hidden; margin:0px; padding:0px;}
        #steps li {font-size:24px; float:left; padding:10px; color:#b0b1b3;}
        #steps li span {font-size:11px; display:block;}
        #steps li.current { color:#000;}
        #makeWizard { background-color:#b0232a; color:#fff; padding:5px 10px; text-decoration:none; font-size:18px;}
        #makeWizard:hover { background-color:#000;}
		.sub{float:right;background-color:#b0232a;color:#fff;border:solid 1px #b0232a;margin: -40px 0 0 -100px;height:25px;}
		.error_msg{color:red;}
		.wrapper{width:400px; margin: 0 auto;}
		.border{border:1px solid white;width:310px;}
		.title{color:white;}

		#message{display:none;	margin-top: 100px;color: #fff; width: 400px;height: 100px;border: 2px solid #fff;border-radius: 10px;position: relative;}
		#message h2, #message p{text-align: center;}
		#message #checkmark{margin-left: 170px;}
		#close{position: absolute;right: -8px;top: -10px;}
		.hide{display: none;}</pre><p>Step 4:</p>
<p>Now include following jQuery library files .</p><pre class="crayon-plain-tag">&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
	&lt;script src='http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js'&gt;&lt;/script&gt;
	&lt;script src='http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.min.js'&gt;&lt;/script&gt;
	&lt;script type="text/javascript" src="formToWizard.js"&gt;&lt;/script&gt;</pre><p>Step 5:</p>
<p>Now add following two lines jQuery script that will convert very long form into multi-step signup form.</p><pre class="crayon-plain-tag">&lt;script type="text/javascript"&gt;
    $(document).ready(function(){
        $("#myform").formToWizard({ submitButton: 'submit_app' });
    });
&lt;/script&gt;</pre><p>Now you had accomplished the goal of converting very long HTML Form into multi-step signup form. Next we are going to add validation each input field in the Multi-Step Signup Form.</p>
<p>If want to customize this formtowizard plugin according to your need please go through following link <a title="Turn any webform into a powerful wizard with jQuery" href="http://www.jankoatwarpspeed.com/turn-any-webform-into-a-powerful-wizard-with-jquery-formtowizard-plugin/" target="_blank">Turn any webform into a powerful wizard with jQuery</a></p>
<p>Step 6:</p>
<p>Normally we will add jQuery validation to all the fields in the HTML Form. But in this tutorial we can&#8217;t do the validation like normally we do. We only add  jQuery validation to input fields only in the first fieldset. Only successfull validation of all the fields in the step one then only we will add validation to step two. then three and four.</p>
<p>Here is the full jQuery validation script.</p><pre class="crayon-plain-tag">(function($) {
    $.fn.formToWizard = function(options) {
        options = $.extend({  
            submitButton: "" 
        }, options); 

		$('#submit_app').on('click',function(){
	       if($("#myform").valid()){
		     $.ajax({
			    type: "POST", 
	    	    url: "show.php",  
	    	    data: $('#myform').serialize(),  
	    	    success: function(msg) {  
					  alert(msg);
					  $("#myform").addClass("hide");
	    		      $("#message").show();
	    	   } 
			 });
			 $('#close').click(function(){ 
				  $('#message').hide();
				  $("#myform").removeClass("hide");
				  $('input[type=text],input[type=email]').val('');
				  location.reload();
			  });
		   }
	   });

        var element = this;

        var steps = $(element).find("fieldset");
        var count = steps.size();
        var submmitButtonName = "#" + options.submitButton;
        $(submmitButtonName).hide();

        // 2
        $(element).before("&lt;ul id='steps'&gt;&lt;/ul&gt;");

        steps.each(function(i) {
            $(this).wrap("&lt;div id='step" + i + "'&gt;&lt;/div&gt;");
            $(this).append("&lt;p id='step" + i + "commands'&gt;&lt;/p&gt;");

            // 2
            var name = $(this).find("legend").html();
            $("#steps").append("");

            if (i == 0) {
                createNextButton(i);
                selectStep(i);
            }
            else if (i == count - 1) {
                $("#step" + i).hide();
                createPrevButton(i);
            }
            else {
                $("#step" + i).hide();
                createPrevButton(i);
                createNextButton(i);
            }
        });

        function createPrevButton(i) {
            var stepName = "step" + i;
            $("#" + stepName + "commands").append("&lt;a href='#' id='" + stepName + "Prev' class='prev'&gt;&lt; Back&lt;/a&gt;");

            $("#" + stepName + "Prev").on("click", function(e) {
			  ///if($('form').valid()){
                $("#" + stepName).hide();
                $("#step" + (i - 1)).show();
                $(submmitButtonName).hide();
                selectStep(i - 1);				
			  //}	
            });
        }

        function createNextButton(i) {
            var stepName = "step" + i;
            $("#" + stepName + "commands").append("&lt;a href='#' id='" + stepName + "Next' class='next'&gt;Next &gt;&lt;/a&gt;");

            $("#" + stepName + "Next").on("click", function(e) {
			if($("#myform").valid()){
                $("#" + stepName).hide();
                $("#step" + (i + 1)).show();
                if (i + 2 == count)
                    $(submmitButtonName).show();
                selectStep(i + 1);

				var q="step" + (i+1);
				if(q=='step1'){

				$("#birth_date").rules("add", {
				 required: true,
				 date: true,
				 messages: {
				   required: "Please enter your Birth Date",
				   date: "Please Enter Valid Date of Birth(dd/mm/yyyy)"
				 }
				});

				$("#drivers_license_number").rules("add", {
				 required: true,
				 license_us: true,
				 messages: {
				   required: "Please enter your License Number",
				   license_us: "Please Enter your Valid License Number"
				 }
				});

				$("#ssn").rules("add", {
				 required: true,
				 ssn_us: true,
				 messages: {
				   required: "Please enter your ssn Number",
				   ssn_us: "Please Enter your Valid ssn Number"
				 }
				});

				$("#drivers_license_state").rules("add", {
				 required: true,
				 messages: {
				   required: "Please enter your driving license state"
				 }
				});

			    }

				if(q=='step2'){

				   $("#employer").rules("add", {
					 required: true,
					 minlength: 10,
					 maxlength: 128,
					 messages: {
					   required: "Please enter Employer's Company Name",
					   minlength: "Please Enter minimum 10 characters"
					 }
					});

					$("#employer_phone").rules("add", {
					 required: true,
					 phoneUS: true,
					 messages: {
					   required: "Please enter Employer's Phone Number",
					   phoneUS: "Please Enter valid phone number"
					 }
					});

					$("#job_title").rules("add", {
					 required: true,
					 minlength: 2,
					 maxlength: 128,
					 messages: {
					   required: "Please enter your job title",
					   minlength: "Please Enter minimum 2 characters",
					   maxlength: "Please Enter only 128 characters only"
					 }
					});

				    $("#employer_months").rules("add", {
					 required: true,
					 messages: {
					   required: "Please enter your experience"
					 }
					});

					$(".active_military").rules("add", {
					 required: true,
					 messages: {
					   required: "Please select your option"
					 }
					});

					/*var original=$('.active_military').attr('class')
					$('.active_military').attr('class','required '+ original);*/
			    }

				if(q=='step3'){

				   $("#monthly_income").rules("add", {
					 required: true,
					 messages: {
					   required: "Please select your monthly income"
					 }
					});
					$("#income_source").rules("add", {
					 required: true,
					 messages: {
					   required: "Please select your income source"
					 }
					});
					$("#payment_frequency").rules("add", {
					 required: true,
					 messages: {
					   required: "Please select your payment frequency"
					 }
					});

				   $("#pay_date1").rules("add", {
					 required: true,
					 date: true,
					 messages: {
					   required: "Please enter your next pay date",
					   date: "Please Enter valid pay date (dd/mm/yyyy)"
					 }
					});

					$("#pay_date2").rules("add", {
					 required: true,
					 date: true,
					 messages: {
					   required: "Please enter your 2nd pay date",
					   date: "Please Enter valid pay date (dd/mm/yyyy)"
					 }
					});

			    }

				if(q=='step4'){
				    //alert("last step");

				   $("#bank_name").rules("add", {
					 required: true,
					 minlength: 2,
					 maxlength: 128,
					 messages: {
					   required: "Please enter your bank name",
					   minlength: "Please Enter minimum 2 characters",
					   maxlength: "Please Enter max 128 characters"
					 }
					});

					$("#bank_aba").rules("add", {
					 required: true,
					 number: true,
					 maxlength: 9,
					 messages: {
					   required: "Please enter your Routing Number",
					   number: "Please Enter valid Routing Number",
					   maxlength: "Please Enter max 9 Numbers"
					 }
					});

					$("#bank_account").rules("add", {
					 required: true,
					 number: true,
					 minlength: 4,
					 maxlength: 30,
					 messages: {
					   required: "Please enter your bank account Number",
					   number: "Please Enter valid bank account Number",
					   minlength: "Please Enter minimum 4 characters",
					   maxlength: "Please Enter max 30 characters"
					 }
					});

					$("#bank_type").rules("add", {
					 required: true,
					 messages: {
					   required: "Please select your account type"
					 }
					});

					$(".direct_deposit").rules("add", {
					 required: true,
					 messages: {
					   required: "Please select your option"
					 }
					});
			    }

			 }	
            });
        }

        function selectStep(i) {
            $("#steps li").removeClass("current");
            $("#stepDesc" + i).addClass("current");
        }

    }
})(jQuery);</pre><p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/multi-step-signup-form-using-jquery-ajax-php-html5-and-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Live Username and Email Availability Checking using PHP, jQuery and Ajax</title>
		<link>http://www.smarttutorials.net/live-username-and-email-availability-checking-using-php-jquery-and-ajax/</link>
		<comments>http://www.smarttutorials.net/live-username-and-email-availability-checking-using-php-jquery-and-ajax/#comments</comments>
		<pubDate>Mon, 20 May 2013 18:15:43 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[check unique email using PHP jQuery and Ajax]]></category>
		<category><![CDATA[check unique username using PHP jQuery and Ajax]]></category>
		<category><![CDATA[jQuery and Ajax]]></category>
		<category><![CDATA[Live Username and Email Availability Checking using PHP]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13598</guid>
		<description><![CDATA[In this tutorial we are going to see how to check user name and email availability using PHP, jQuery and Ajax. This task is easily done with the help of jQuery validation plugin remote() method. When user enters their name or email in the textbox, remote() method of jQuery validation plugin will send the entered [...]]]></description>
				<content:encoded><![CDATA[<p>In this tutorial we are going to see how to check user name and email availability using PHP, jQuery and Ajax. This task is easily done with the help of jQuery validation plugin remote() method.</p>
<p>When user enters their name or email in the textbox, remote() method of jQuery validation plugin will send the entered value to the backend (PHP File). PHP file compares the entered user name or email with user name or email in the database. If user name or email already exists in the database then it will return &#8216;false&#8217; string as response. If user name or email not exists already in the database then it will return &#8216;true&#8217; string as response.</p>
<div id="attachment_13600" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/05/check-unique-email-and-user-name-using-jquery-validation-plugin-php-ajax.jpg" rel="lightbox[13598]" title="Check unique Username and Email Availability using PHP, jQuery and Ajax"><img class="size-full wp-image-13600" title="Check unique Username and Email Availability using PHP, jQuery and Ajax" alt="check unique Username and Email Availability using PHP, jQuery and Ajax" src="http://www.smarttutorials.net/wp-content/uploads/2013/05/check-unique-email-and-user-name-using-jquery-validation-plugin-php-ajax.jpg" width="700" height="300" /></a><p class="wp-caption-text">Check unique Username and Email Availability using PHP, jQuery and Ajax</p></div>
<div id="attachment_10980" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/remote/" target="_blank"><img class="size-full wp-image-10980" title="check unique Username and Email Availability using PHP, jQuery and Ajax Demo" alt="check unique Username and Email Availability using PHP, jQuery and Ajax Demo" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<p>Step 1:</p>
<p>Create index.php file and add following html code in it.</p><pre class="crayon-plain-tag">&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;jQuery Validation Plugin Remote Method Example&lt;/title&gt;
&lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'&gt;&lt;/script&gt;
&lt;script src='http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js'&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;jQuery Validation Plugin Remote Method Example&lt;/p&gt;
&lt;div class='main'&gt;
&lt;form id='mailForm' method='post' action='index.php'&gt;
	&lt;table&gt;
		 &lt;tr&gt;
			&lt;td&gt;&lt;input type="text" id="username" name="username" class='txt' placeholder='User Name'/&gt;&lt;/td&gt;
			&lt;td class="status"&gt;&lt;/td&gt;
		 &lt;/tr&gt;
		 &lt;tr&gt;
			&lt;td&gt;&lt;input type="text" id="email" name="email" class='txt' placeholder='Your Email'/&gt;&lt;/td&gt;
			&lt;td class="status"&gt;&lt;/td&gt;
		 &lt;/tr&gt;
		 &lt;tr&gt;
			&lt;td colspan='2'&gt;
				&lt;input type='submit' name='submit' value='submit' class='but'/&gt;
			&lt;/td&gt;
		 &lt;/tr&gt;
	&lt;/table&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>&nbsp;</p>
<div id="attachment_10984" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=14" target="_blank"><img class="size-full wp-image-10984" title="how to check unique Username and Email Availability using PHP, jQuery and Ajax " alt="how to check unique Username and Email Availability using PHP, jQuery and Ajax " src="http://www.smarttutorials.net/wp-content/uploads/2013/02/download1.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div>
<p>Step 2:</p>
<p>Now add following css style in the head of the html file.</p><pre class="crayon-plain-tag">&lt;style&gt;
.error{color:red;}
.main{width:500px; margin:0px auto;}
@font-face{font-family: Lobster;src: url('Lobster.otf');}
body{width:750px;margin:0px auto;}
.space{margin-bottom: 4px;}
.txt{width:270px;border:1px solid #00BB64;height:30px;border-radius:3px;color:#00BB64;margin-bottom:5px;}
p{font-family: Lobster;font-size:35px;text-align:center;}
.but{width:270px;background:#00BB64;border:1px solid #00BB64;height:40px;border-radius:3px;color:white;margin-top:10px;}
em.error {background:url("unchecked.gif") no-repeat 0px 0px;padding-left: 16px;color: #ff0000;font-weight: bold;}
em.success {background:url("checked.gif") no-repeat 0px 0px;padding-left: 16px;color: #33ff55 !important;}
&lt;/style&gt;</pre><p>Step 3:</p>
<p>Create dummy table using the following SQL query.</p><pre class="crayon-plain-tag">CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;</pre><p>then insert some dummy data&#8217;s into the table using following SQL query.</p><pre class="crayon-plain-tag">INSERT INTO `users` (`id`, `username`, `email`) VALUES
(1, 'muni', 'muni2explore@gmail.com'),
(2, 'sasi', 'sasi@gmail.com');</pre><p>Step 4:</p>
<p>Create config.php file to database connection information separtely.</p><pre class="crayon-plain-tag">&lt;?php
define('DB_HOST', 'localhost');
define('DB_NAME', 'test');
define('DB_USER','root');
define('DB_PASSWORD','');

$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error());
$db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_error());

?&gt;</pre><p>Step 5:</p>
<p>Now add the following jQuery validation script to add validation to user name email fields in the html form.</p><pre class="crayon-plain-tag">&lt;script&gt;
   $('document').ready(function(){
       $("#mailForm").validate({
			     rules: {
					username: {
					   required: true,
					   minlength : 3,
					   remote: "ajax_unique.php?data=name"
					},
					email:{ 
					   required: true,
					   email: true,
					   remote: "ajax_unique.php?data=email"
					}
			     },
			     messages: {
						username: {
						   required:"Please enter your name",
						   minlength: "Please enter a minimun 3 chars",
						   remote: "Username is already exists"
						},
						email:{ 
						   required: "Please enter your email",
						   email: "Please enter a valid email address",
						   remote: "Email is already exists"
						}
			     },
				 debug: true,
				 errorElement: "em",
				 errorContainer: $("#warning, #summary"),
				 errorPlacement: function(error, element) {
					error.appendTo( element.parent("td").next("td") );
				 },
				 success: function(label) {
					label.text("ok!").addClass("success");
				 }	
		});		 
   });

&lt;/script&gt;</pre><p>where remote() will call <strong>ajax_unique.php </strong>and send user entered information to PHP file during blur() jQuery event.</p>
<p>Step 6:</p>
<p>Here is PHP script that will receive ajax request and compares the users entered information with values in the database. Finally it sends response as &#8216;true&#8217;  or &#8216;false&#8217; string.</p><pre class="crayon-plain-tag">&lt;?php
require_once 'config.php';

if($_GET['data']=='name'){
   $value=unique_name($_GET['username']);
}

if($_GET['data']=='email'){
   $value=unique_email($_GET['email']);
}

function unique_name($name=''){
	  $query="select count(musician_name) from user where musician_name='$name'";
	   $response=mysql_query($query);
	   $result=mysql_fetch_array($response);
	   if($result[0]&gt;0){
		  echo 'false';
	   }
	   else{
		 echo 'true';
	   }

}	
function unique_email($email=''){
	  $query="select count(email) from user where email='$email'";
	   $response=mysql_query($query);
	   $result=mysql_fetch_array($response);
	   if($result[0]&gt;0){
		  echo 'false';
	   }
	   else{
		 echo 'true';
	   }

}
?&gt;</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/live-username-and-email-availability-checking-using-php-jquery-and-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamically Add and Remove Textbox Using jQuery</title>
		<link>http://www.smarttutorials.net/dynamically-add-and-remove-textbox-using-jquery/</link>
		<comments>http://www.smarttutorials.net/dynamically-add-and-remove-textbox-using-jquery/#comments</comments>
		<pubDate>Sun, 19 May 2013 17:56:51 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[Dynamically Add and delete Textbox Using jQuery]]></category>
		<category><![CDATA[Dynamically Add and Remove Textbox Using jQuery]]></category>
		<category><![CDATA[how to dynamically add and remove textbox using jquery]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13582</guid>
		<description><![CDATA[Dynamically add and delete textboxes using jQuery may you require in some projects or you like to do this to learn some interesting jQuery stuffs. Now we are going to make this stuff by going through step by step, so that you can make it yourself as well learn the logics and some basic of [...]]]></description>
				<content:encoded><![CDATA[<p>Dynamically add and delete textboxes using jQuery may you require in some projects or you like to do this to learn some interesting jQuery stuffs. Now we are going to make this stuff by going through step by step, so that you can make it yourself as well learn the logics and some basic of jQuery selectors and events.</p>
<div id="attachment_13583" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/05/dynamically-add-and-remove-textbox-using-jquery.jpg" rel="lightbox[13582]" title="Dynamically Add and Remove Textboxes using jQuery"><img class="size-full wp-image-13583" title="Dynamically Add and Remove Textboxes using jQuery" alt="Dynamically Add and Remove Textboxes using jQuery" src="http://www.smarttutorials.net/wp-content/uploads/2013/05/dynamically-add-and-remove-textbox-using-jquery.jpg" width="700" height="300" /></a><p class="wp-caption-text">Dynamically Add and Remove Textboxes using jQuery</p></div>
<p>&nbsp;</p>
<div id="attachment_10935" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/dynamic_textbox/" target="_blank"><img class="size-full wp-image-10935" title="Demo of Dynamically Add and Remove Textboxes using jQuery" alt="Demo of Dynamically Add and Remove Textboxes using jQuery" src="http://www.smarttutorials.net/wp-content/uploads/2012/04/live.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<p>&nbsp;</p>
<p>step 1:<br />
Create index.html and add jQuery libary, textbox and an image(addition).</p><pre class="crayon-plain-tag">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Dynamic Textbox addition and Deletion using jQuery&lt;/title&gt;
&lt;meta charset='utf-8'&gt;
&lt;script src='js/jquery-1.9.1.min.js'&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Dynamically Add and Delete Textbox using jQuery&lt;/p&gt;
&lt;div id="advice" style="width: 400px; height: auto;margin:0px auto;"&gt;
  &lt;form&gt;
  &lt;div id="button_pro"&gt;
    &lt;div class='space' id='input_1'&gt;
        &lt;input id="input_1" type="text" name="val[]" class='left txt'/&gt;
        &lt;img src="images/add.png" /&gt;
    &lt;/div&gt;
   &lt;/div&gt;    
    &lt;input type='submit' value='Kiss Me!' class='but'/&gt;
 &lt;/form&gt;    
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>&nbsp;</p>
<div id="attachment_12916" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=13" target="_blank"><img class="size-full wp-image-12916" title="Dynamically Add and Remove Textboxes using jQuery" alt="Dynamically Add and Remove Textboxes using jQuery" src="http://www.smarttutorials.net/wp-content/uploads/2012/04/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div>
<p>Step 2:</p>
<p>Now add below css styles in the head section to add a beauty.</p><pre class="crayon-plain-tag">&lt;style&gt;
@font-face{font-family: Lobster;src: url('Lobster.otf');}
body{width:750px;margin:0px auto;}
.space{margin-bottom: 4px;}
.txt{width:250px;border:1px solid #00BB64; height:30px;border-radius:3px;font-family: Lobster;font-size:20px;color:#00BB64;}
p{font-family: Lobster;font-size:35px; text-align:center;}
.but{width:250px;background:#00BB64;border:1px solid #00BB64;height:40px;border-radius:3px;color:white;margin-top:10px;}
&lt;/style&gt;</pre><p>Step 3:<br />
Now we come into party of jQuery. First task is when we clicked on plus image it will dynamically add textboxes into the form.</p><pre class="crayon-plain-tag">var id=2,txt_box;
	$('#button_pro').on('click','.add',function(){
		  $(this).remove();
		  txt_box='&lt;div class="space" id="input_'+id+'" &gt;&lt;input type="text" name="val[]" class="left txt"/&gt;&lt;img src="images/remove.png" class="remove"/&gt;&lt;img class="add right" src="images/add.png" /&gt;&lt;/div&gt;';
		  $("#button_pro").append(txt_box);
		  id++;
	});</pre><p>when we clicked on the add image it will append textbox, plus image (addition) and minus image(Delete), as well we remove plus image next to the first textboxes.</p>
<p>Step 4:</p>
<p>Now add following script to do operation when we clicked on the minus image(Delete).</p><pre class="crayon-plain-tag">$('#button_pro').on('click','.remove',function(){
	        var parent=$(this).parent().prev().attr("id");
			var parent_im=$(this).parent().attr("id");
			$("#"+parent_im).slideUp('medium',function(){
				$("#"+parent_im).remove();
				if($('.add').length&lt;1){
					$("#"+parent).append('&lt;img src="images/add.png" class="add right"/&gt; ');
				}
	        });
   });</pre><p>This will get the current parent id of the textbox and hide textbox.</p><pre class="crayon-plain-tag">var parent_im=$(this).parent().attr("id");
$("#"+parent_im).slideUp('medium');</pre><p>Following script gets the current textbox previous container id.</p><pre class="crayon-plain-tag">var parent=$(this).parent().prev().attr("id");</pre><p>Following script checks if there is no add image it&#8217;ll add image to the form.</p><pre class="crayon-plain-tag">if($('.add').length&lt;1){
  $("#"+parent).append('&lt;img src="images/add.png" class="add right"/&gt; ');
}</pre><p>Please refer one of my interesting tutorial using jQuery&#8211; <a title="Dynamically Add or Remove Table Row Using jQuery" href="http://http://www.smarttutorials.net/dynamically-add-or-remove-table-row-using-jquery/" target="_blank">Dynamically Add or Remove Table Row Using jQuery</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/dynamically-add-and-remove-textbox-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quiz application Using PHP, jQuery, Ajax, MySQL and HTML5</title>
		<link>http://www.smarttutorials.net/quiz-application-using-php-jquery-ajax-mysql-and-html5/</link>
		<comments>http://www.smarttutorials.net/quiz-application-using-php-jquery-ajax-mysql-and-html5/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 18:45:18 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[how to make quiz using php mysql jquery ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MySQL and HTML5]]></category>
		<category><![CDATA[Quiz application Using PHP]]></category>
		<category><![CDATA[quiz php script]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13543</guid>
		<description><![CDATA[Everyone likes to make some hello world application, here is that type application you can make it youself. I am going to make Quiz application using PHP, MySQL, HTML5, jQuery, Ajax and CSS3. Just follow this tutorial to make it this appliaction youself. At the end of this tutorial you are going to have nice [...]]]></description>
				<content:encoded><![CDATA[<p>Everyone likes to make some hello world application, here is that type application you can make it youself.<br />
I am going to make Quiz application using PHP, MySQL, HTML5, jQuery, Ajax and CSS3. Just follow this tutorial to make it this appliaction youself. At the end of this tutorial you are going to have nice working your Quiz Application.</p>
<div id="attachment_11316" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/Quiz/" target="_blank"><img class="size-full wp-image-11316" title="quiz application using php,mysql,jquery, ajax, html5 and css3" alt="quiz application using php,mysql,jquery, ajax, html5 and css3" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live1.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<div id="attachment_13546" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/04/quiz-application-using-php-jQuery-ajax-MySQL-HTML5-and-css3.png" rel="lightbox[13543]" title="Quiz application Using PHP, jQuery, Ajax, MySQL and HTML5"><img class="size-full wp-image-13546" alt="quiz application using php,mysql,jquery, ajax, html5 and css3" src="http://www.smarttutorials.net/wp-content/uploads/2013/04/quiz-application-using-php-jQuery-ajax-MySQL-HTML5-and-css3.png" width="700" height="300" /></a><p class="wp-caption-text">Quiz Application using PHP, MySQL,jQuery, Ajax, html5 and css3</p></div>
<p>Here is the folder structure of the application.</p>
<p><a href="http://www.smarttutorials.net/wp-content/uploads/2013/04/quiz-application-using-php-jQuery-ajax-MySQL-and-HTML5.png" rel="lightbox[13543]" title="Quiz application Using PHP, jQuery, Ajax, MySQL and HTML5"><img class="aligncenter size-full wp-image-13547" alt="quiz application using php, jQuery, ajax, MySQL and HTML5" src="http://www.smarttutorials.net/wp-content/uploads/2013/04/quiz-application-using-php-jQuery-ajax-MySQL-and-HTML5.png" width="290" height="201" /></a></p>
<p>Step 1:</p>
<p>Create a table for your Quiz application using following SQL Queries.</p><pre class="crayon-plain-tag">CREATE TABLE IF NOT EXISTS `questions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `question_name` text NOT NULL,
  `answer1` varchar(50) NOT NULL,
  `answer2` varchar(50) NOT NULL,
  `answer3` varchar(50) NOT NULL,
  `answer4` varchar(50) NOT NULL,
  `answer` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;</pre><p>Now insert some sample data&#8217;s in it.</p><pre class="crayon-plain-tag">INSERT INTO `questions` (`id`, `question_name`, `answer1`, `answer2`, `answer3`, `answer4`, `answer`) VALUES
(1, 'What does PHP stand for?', 'Personal Home Page', 'Personal Hypertext Processor', 'Private Home Page', 'PHP: Hypertext Preprocessor', '4'),
(2, 'How do you write "Hello World" in PHP', 'Document.Write("Hello World");', 'echo "Hello World";', '"Hello World";', '"Hello World";', '2'),
(3, 'The PHP syntax is most similar to:', 'VBScript', 'JavaScript', 'Perl and C', 'Perl and C', '3'),
(4, 'How do you get information from a form that is submitted using the "get" method?', 'Request.Form;', '$_GET[];', 'Request.QueryString;', 'Request.QueryString;', '2');</pre><p><div id="attachment_12487" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=12" target="_blank"><img class="size-full wp-image-12487" title="quiz application using php, mysql, jquery , ajax , html5 and css3" alt="quiz application using php, mysql, jquery , ajax , html5 and css3" src="http://www.smarttutorials.net/wp-content/uploads/2013/03/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div></p>
<p>Step 2:</p>
<p>Create config.php file to write database connection at one place.</p><pre class="crayon-plain-tag">&lt;?php
define('DB_HOST', 'localhost');
define('DB_NAME', 'test');
define('DB_USER','root');
define('DB_PASSWORD','');

$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error());
$db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_error());

?&gt;</pre><p>Step 3:<br />
Now create index.php file, and include config.php file at the first.</p><pre class="crayon-plain-tag">&lt;?php require_once 'config.php';?&gt;</pre><p>now html part. I added stylesheet in the head section and h1 tag in the body.</p><pre class="crayon-plain-tag">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Demo Gird&lt;/title&gt;
&lt;meta charset='utf-8'&gt;
&lt;link rel='stylesheet' href='css/style.css'/&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;h1&gt;Quiz using PHP, jQuery, Ajax and MySQL&lt;/h1&gt;</pre><p>Next query through the database to get questions and answers from the database.</p><pre class="crayon-plain-tag">&lt;?php $response=mysql_query("select * from questions");?&gt;</pre><p>Using that data&#8217;s we are going to dynamically generate form fields for all questions.</p><pre class="crayon-plain-tag">&lt;form method='post' id='quiz_form'&gt;
&lt;?php while($result=mysql_fetch_array($response)){ ?&gt;
&lt;div id="question_&lt;?php echo $result['id'];?&gt;" class='questions'&gt;
&lt;h2 id="question_&lt;?php echo $result['id'];?&gt;"&gt;&lt;?php echo $result['id'].".".$result['question_name'];?&gt;&lt;/h2&gt;
&lt;div class='align'&gt;
&lt;input type="radio" value="1" id='radio1_&lt;?php echo $result['id'];?&gt;' name='&lt;?php echo $result['id'];?&gt;'&gt;
&lt;label id='ans1_&lt;?php echo $result['id'];?&gt;' for='1'&gt;&lt;?php echo $result['answer1'];?&gt;&lt;/label&gt;
&lt;br/&gt;
&lt;input type="radio" value="2" id='radio2_&lt;?php echo $result['id'];?&gt;' name='&lt;?php echo $result['id'];?&gt;'&gt;
&lt;label id='ans2_&lt;?php echo $result['id'];?&gt;' for='1'&gt;&lt;?php echo $result['answer2'];?&gt;&lt;/label&gt;
&lt;br/&gt;
&lt;input type="radio" value="3" id='radio3_&lt;?php echo $result['id'];?&gt;' name='&lt;?php echo $result['id'];?&gt;'&gt;
&lt;label id='ans3_&lt;?php echo $result['id'];?&gt;' for='1'&gt;&lt;?php echo $result['answer3'];?&gt;&lt;/label&gt;
&lt;br/&gt;
&lt;input type="radio" value="4" id='radio4_&lt;?php echo $result['id'];?&gt;' name='&lt;?php echo $result['id'];?&gt;'&gt;
&lt;label id='ans4_&lt;?php echo $result['id'];?&gt;' for='1'&gt;&lt;?php echo $result['answer4'];?&gt;&lt;/label&gt;
&lt;input type="radio" checked='checked' value="5" style='display:none' id='radio4_&lt;?php echo $result['id'];?&gt;' name='&lt;?php echo $result['id'];?&gt;'&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;input type="button" id='next&lt;?php echo $result['id'];?&gt;' value='Next!' name='question' class='butt'/&gt;
&lt;/div&gt;
&lt;?php }?&gt;
&lt;/form&gt;</pre><p>Step 4:</p>
<p>now using jQuery i will show only one questions at a time.Here is jQuery script.</p><pre class="crayon-plain-tag">&lt;script src="js/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
&lt;script src="js/watch.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function(){
	$('#demo1').stopwatch().stopwatch('start');
	var steps = $('form').find(".questions");
	var count = steps.size();
	steps.each(function(i){
		hider=i+2;
		if (i == 0) { 	
    		$("#question_" + hider).hide();
    		createNextButton(i);
        }
		else if(count==i+1){
			var step=i + 1;
			//$("#next"+step).attr('type','submit');
            $("#next"+step).on('click',function(){

			   submit();

            });
	    }
		else{
			$("#question_" + hider).hide();
			createNextButton(i);
		}

	});
    function submit(){
	     $.ajax({
						type: "POST",
						url: "ajax.php",
						data: $('form').serialize(),
						success: function(msg) {
						  $("#quiz_form,#demo1").addClass("hide");
						  $('#result').show();
						  $('#result').append(msg);
						}
	     });

	}
	function createNextButton(i){
		var step = i + 1;
		var step1 = i + 2;
        $('#next'+step).on('click',function(){
        	$("#question_" + step).hide();
        	$("#question_" + step1).show();
        });
	}
	setTimeout(function() {
	      submit();
	}, 50000);
});
&lt;/script&gt;</pre><p>At the end final question I am posting all the answers to ajax.php file using ajax to validate right, wrong and unanswered questions.</p><pre class="crayon-plain-tag">$.ajax({
			type: "POST",
			url: "ajax.php",
			data: $('form').serialize(),
			success: function(msg) {
			  $("#quiz_form,#demo1").addClass("hide");
			  $('#result').show();
			  $('#result').append(msg);
			}
	     });</pre><p>Step 5:</p>
<p>Finally create ajax.php file that&#8217;s going to validate your answers.</p><pre class="crayon-plain-tag">&lt;?php
require_once 'config.php';

$response=mysql_query("select id,question_name,answer from questions");
	 $i=1;
	 $right_answer=0;
	 $wrong_answer=0;
	 $unanswered=0;
	 while($result=mysql_fetch_array($response)){ 
	       if($result['answer']==$_POST["$i"]){
		       $right_answer++;
		   }else if($_POST["$i"]==5){
		       $unanswered++;
		   }
		   else{
		       $wrong_answer++;
		   }
		   $i++;
	 }
	 echo "&lt;div id='answer'&gt;";
	 echo " Right Answer  : &lt;span class='highlight'&gt;". $right_answer."&lt;/span&gt;&lt;br&gt;";

	 echo " Wrong Answer  : &lt;span class='highlight'&gt;". $wrong_answer."&lt;/span&gt;&lt;br&gt;";

	 echo " Unanswered Question  : &lt;span class='highlight'&gt;". $unanswered."&lt;/span&gt;&lt;br&gt;";
	 echo "&lt;/div&gt;";
?&gt;</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/quiz-application-using-php-jquery-ajax-mysql-and-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Plugin to Disable Copy and Paste on Your Site</title>
		<link>http://www.smarttutorials.net/jquery-plugin-to-disable-copy-and-paste-on-your-site/</link>
		<comments>http://www.smarttutorials.net/jquery-plugin-to-disable-copy-and-paste-on-your-site/#comments</comments>
		<pubDate>Sat, 20 Apr 2013 11:09:07 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[jquery plugin to disable copy and paste]]></category>
		<category><![CDATA[jQuery Plugin to Disable Copy and Paste on Your Site]]></category>
		<category><![CDATA[jquery script to disable copy and paste]]></category>
		<category><![CDATA[jquery script to disable selection]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13509</guid>
		<description><![CDATA[This jQuery plugin helps you to prevent copy and paste of your post content from your blog. This mainly helps you to avoid someone from copying the your quality content. Here is the demo page you can test it right now. This is very simple to add this in your blog. Just follow few steps [...]]]></description>
				<content:encoded><![CDATA[<p>This jQuery plugin helps you to prevent copy and paste of your post content from your blog. This mainly helps you to avoid someone from copying the your quality content.</p>
<p>Here is the demo page you can test it right now.</p>
<div id="attachment_10980" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/disable/" target="_blank"><img class="size-full wp-image-10980" title="jquery script to disable selection" alt="jquery script to disable selection" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<div id="attachment_13510" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/04/jquery-script-to-disable-selection.png" rel="lightbox[13509]" title="jquery-script-to-disable-selection"><img class="size-full wp-image-13510" title="jquery-script-to-disable-selection" alt="jquery-script-to-disable-selection" src="http://www.smarttutorials.net/wp-content/uploads/2013/04/jquery-script-to-disable-selection.png" width="700" height="300" /></a><p class="wp-caption-text">jQuery script to Disable Selection</p></div>
<p>This is very simple to add this in your blog. Just follow few steps to add it.</p>
<p>Step 1:</p>
<p>Add following jQuery plugins in the head (&lt;head&gt; &lt;/head&gt;)section of the html home page.</p><pre class="crayon-plain-tag">&lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'&gt;&lt;/script&gt;
&lt;script src='https://dl.dropboxusercontent.com/u/49791983/disableSelection.js'&gt;&lt;/script&gt;</pre><p>Note:</p>
<p>If your are a blogger, go to html editing page. Find &lt;/head&gt; tag and add above plugins before &lt;/head&gt; tag.</p>
<div id="attachment_12487" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=11" target="_blank"><img class="size-full wp-image-12487" title="jquery script to disable selection" alt="jquery script to disable selection" src="http://www.smarttutorials.net/wp-content/uploads/2013/03/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div>
<p>Step2:</p>
<p>Now add following script just below that.</p><pre class="crayon-plain-tag">&lt;script&gt;
$(document).ready(function(){
$('body').disableSelection();
});
&lt;/script&gt;</pre><p>Note: Add this jQuery library only if you never add it before in your page.</p><pre class="crayon-plain-tag">&lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'&gt;&lt;/script&gt;</pre><p>If you felt any difficulty implementing this please leave the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/jquery-plugin-to-disable-copy-and-paste-on-your-site/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Autocomplete Using jQuery, Ajax, PHP and MySQL</title>
		<link>http://www.smarttutorials.net/autocomplete-using-jquery-ajax-php-and-mysql/</link>
		<comments>http://www.smarttutorials.net/autocomplete-using-jquery-ajax-php-and-mysql/#comments</comments>
		<pubDate>Thu, 11 Apr 2013 18:11:25 +0000</pubDate>
		<dc:creator>muni</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[autocomplete jquery]]></category>
		<category><![CDATA[AutoComplete Using jQuery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP and MySQL]]></category>
		<category><![CDATA[php autocomplete jquery]]></category>

		<guid isPermaLink="false">http://www.smarttutorials.net/?p=13420</guid>
		<description><![CDATA[In this tutorial we are going to see autocomplete using jQuery, Ajax,PHP and MySQL. &#160; Follow each steps carefully to create this autocomplete function by yourself. Step 1: create this below table using the below query. [crayon-51c2cd13841f8/] Step 2: Create index.php file and add the following html codes to create autocomplete text box. [crayon-51c2cd13845c0/] Step [...]]]></description>
				<content:encoded><![CDATA[<p>In this tutorial we are going to see autocomplete using jQuery, Ajax,PHP and MySQL.</p>
<div id="attachment_11316" class="wp-caption aligncenter" style="width: 85px"><a href="http://demo.smarttutorials.net/auto_complete/" target="_blank"><img class="size-full wp-image-11316" title="AutoComplete Using jQuery, Ajax, PHP and MySQL" alt="AutoComplete Using jQuery, Ajax, PHP and MySQL" src="http://www.smarttutorials.net/wp-content/uploads/2013/02/live1.png" width="75" height="75" /></a><p class="wp-caption-text">Demo</p></div>
<p>&nbsp;</p>
<div id="attachment_13421" class="wp-caption aligncenter" style="width: 710px"><a href="http://www.smarttutorials.net/wp-content/uploads/2013/04/autocomplete-using-jquery-ajax-php-and-mysql.png" rel="lightbox[13420]" title="Autocomplete Using jQuery, Ajax, PHP and MySQL"><img class="size-full wp-image-13421" alt="AutoComplete Using jQuery, Ajax, PHP and MySQL" src="http://www.smarttutorials.net/wp-content/uploads/2013/04/autocomplete-using-jquery-ajax-php-and-mysql.png" width="700" height="300" /></a><p class="wp-caption-text">AutoComplete Using jQuery, Ajax, PHP and MySQL</p></div>
<p>Follow each steps carefully to create this autocomplete function by yourself.</p>
<p>Step 1:</p>
<p>create this below table using the below query.</p><pre class="crayon-plain-tag">CREATE TABLE IF NOT EXISTS `auto` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` varchar(75) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;</pre><p><div id="attachment_12487" class="wp-caption aligncenter" style="width: 85px"><a href="http://www.smarttutorials.net/subscribers.php?id=10" target="_blank"><img class="size-full wp-image-12487" title="AutoComplete Using jQuery, Ajax, PHP and MySQL" alt="AutoComplete Using jQuery, Ajax, PHP and MySQL" src="http://www.smarttutorials.net/wp-content/uploads/2013/03/download.png" width="75" height="75" /></a><p class="wp-caption-text">Download</p></div></p>
<p>Step 2:</p>
<p>Create index.php file and add the following html codes to create autocomplete text box.</p><pre class="crayon-plain-tag">&lt;h1&gt;AutoComplete Using jQuery, Ajax, PHP and MySQL&lt;/h1&gt;
&lt;div class="ui-widget"&gt;
&lt;label for="tags"&gt;Type Something: &lt;/label&gt;
&lt;input id="tags" /&gt;
&lt;/div&gt;</pre><p>Step 3:</p>
<p>Add the following css to add styles to our html we just created.</p><pre class="crayon-plain-tag">* {
   background-color: #16a085;
   margin: 0;
   padding: 0;
   color: white;
}
@font-face{
font-family: Lobster;
src: url('Lobster.otf');
}
h1{
font-family: Lobster;
text-align: center;
color: white;
margin-top: 50px;
font-size: 3em;
}

.ui-autocomplete-input{
 color: white;
}

.ui-widget {
    color: white;
    font-family: 'Lobster';
    font-size: 2em;
    text-align: center;
	margin-top: 130px;
}
#tags{

    background: none repeat scroll 0 0 white;
    height: 35px;
    width: 300px;
	color: blue;
	text-align: center;
	border: 2px solid white;
	border-radius: 5px;

}</pre><p>Step 4:</p>
<p>Add following jQuery library files in the index.php file.</p><pre class="crayon-plain-tag">&lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
&lt;script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"&gt;&lt;/script&gt;</pre><p>&nbsp;</p>
<p>Step 5:</p>
<p>Now in the keyup() event of the autocomplete textbox, I am getting the user entered values.</p><pre class="crayon-plain-tag">&lt;script&gt;
$(function() {
$('#tags').keyup(function(){
     var data=$('#tags').val();
});
&lt;/script&gt;</pre><p>Now using $.ajax() function, I am making ajax request to the php file that&#8217;s going to provide autocompletion values.</p><pre class="crayon-plain-tag">&lt;script&gt;
$(function() {
$('#tags').keyup(function(){
     var data=$('#tags').val();
	 $.ajax({
	   type:'POST',
	   url:'ajax.php',
	   data:"data="+data,
	   dataType: "json",
	   success: function(msg){
	        var availableTags = msg;
			$("#tags").autocomplete({
			   source: availableTags
			});
	   }
	});

});
});
&lt;/script&gt;</pre><p>&nbsp;</p>
<p>Step 6:</p>
<p>Create ajax.php file that gets the ajax request. It process the request data and provides auto completion values.</p><pre class="crayon-plain-tag">&lt;?php
$data=$_POST['data'];
$result=mysql_query("SELECT * FROM auto where data LIKE '$data%'");
$data=array();
while($response=mysql_fetch_array($result)){
array_push($data,$response['data']);
}
echo json_encode($data);
?&gt;</pre><p>It gets post data, and using that post data we are going query the database. Result will be saved in array, finally the result is converted into json values and send it back to index.php file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smarttutorials.net/autocomplete-using-jquery-ajax-php-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 4.430 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-06-20 09:36:21 -->
