<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>WEB CODE ++</title>
	<atom:link href="http://lalumishra.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lalumishra.wordpress.com</link>
	<description>New way to learn ....</description>
	<lastBuildDate>Tue, 28 Sep 2010 02:38:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='lalumishra.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>WEB CODE ++</title>
		<link>http://lalumishra.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://lalumishra.wordpress.com/osd.xml" title="WEB CODE ++" />
	<atom:link rel='hub' href='http://lalumishra.wordpress.com/?pushpress=hub'/>
		<item>
		<title>PopUp Boxes</title>
		<link>http://lalumishra.wordpress.com/2010/07/31/popup-boxes/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/31/popup-boxes/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 06:07:15 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1230</guid>
		<description><![CDATA[Basis 1.Alert Box -The syntax for an alert box is: alert(&#8220;text&#8221;); -The user will need to click &#8220;OK&#8221; to proceed. -It is used when you want to make sure information comes through to the user. -Ex alert(&#8220;Please enter your name&#8221;); Examples of alert box could be warnings of any kind. 2.Confirm Box -The syntax for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1230&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;"><span style="text-decoration:underline;">Basis</span></span></p>
<p>1.<b>Alert Box</b><br />
-The syntax for an alert box is: alert(&#8220;text&#8221;);<br />
-The user will need to click &#8220;OK&#8221; to proceed.<br />
-It is used when you want to make sure information comes through    to the user.<br />
-<span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span><br />
alert(&#8220;Please enter your name&#8221;);<br />
Examples of alert box could be warnings of any kind.</p>
<p>2.<b>Confirm Box</b><br />
-The syntax for a confirm box is: confirm(&#8220;text&#8221;);<br />
-The user needs to click either &#8220;OK&#8221; or &#8220;Cancel&#8221; to proceed.<br />
-It is used when you want the user to verify or accept something.<br />
-<span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span><br />
if (confirm(&#8220;Submit&#8221;)){<br />
alert(&#8220;Ok&#8221;)<br />
}<br />
else{<br />
alert (&#8220;Cancel&#8221;)<br />
};<br />
If the user clicks &#8220;OK&#8221;, the box returns the value true.<br />
If the user clicks &#8220;Cancel&#8221;, the box returns the value false.</p>
<p>3.<b>Prompt Box</b><br />
-The prompt box syntax is: prompt(&#8220;text&#8221;,&#8221;defaultvalue&#8221;);<br />
-The user must click either &#8220;OK&#8221; or &#8220;Cancel&#8221; to proceed after entering the text.<br />
-The user should input a value before entering the page.<br />
-<span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span><br />
username=prompt(&#8220;Please enter your name&#8221;,&#8221;Enter your name here&#8221;);<br />
The value stored in a variable called username.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1230&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/31/popup-boxes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>Sessions in PHP</title>
		<link>http://lalumishra.wordpress.com/2010/07/29/1216/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/29/1216/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 11:30:56 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1216</guid>
		<description><![CDATA[Basis Sessions are used to store information which can be used through-out the application for the entire time the user is logged in or running the application. Each time a user visits your website, you can create a session for that user to store information pertaining to that user. In web applications, all the stored [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1216&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;"><span style="text-decoration:underline;">Basis</span></span></p>
<p>Sessions are used to store information which can be used through-out the application for the entire time the user is logged in or running the application. Each time a user visits your website, you can create a session for that user to store information pertaining to that user.</p>
<p>In web applications, all the stored variables and objects are not globally available throughout all pages, so to tackle this problem sessions are utilized.</p>
<p>1.<b>Starting Sessions</b>-In PHP, information is stored in session variables. Before you can store any information in session variables, you must first start up the session using the session_start() function.</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
session_start();<br />
?&gt;</p>
<p>&lt;html&gt;<br />
&lt;body&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p><span style="color:#0000ff;"><span style="text-decoration:underline;">Outline</span></span></p>
<p>When you start a session a unique session id (PHPSESSID) for each visitor/user is created. You can access the session id using the PHP predefined constant PHPSESSID.</p>
<p>The code above starts a session for the user on the server, and assign a session id for that user&#8217;s session.</p>
<p>2.<b>Storing information in a session</b>-To store information is a session variable, you must use the predefined session variable $_SESSION. </p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
session_start(); </p>
<p>$_SESSION["username"] = &#8220;gopal&#8221;;<br />
$_SESSION["password"] = &#8220;gopi123&#8243;;<br />
?&gt;</p>
<p><span style="color:#0000ff;"><span style="text-decoration:underline;">Outline</span></span></p>
<p>Here in this example we have store user&#8217;s name and their password in a session. </p>
<p>3.<b>Retrieving stored session information</b>-you can access the stored session information on any page. </p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
session_start(); </p>
<p>echo $_SESSION["username"];<br />
echo &#8220;&lt;br /&gt;&#8221;;<br />
echo $_SESSION["password"];<br />
?&gt;</p>
<p><span style="color:#008000;"><span style="text-decoration:underline;">Output</span></span></p>
<p>gopal<br />
gopi123</p>
<p>4.<b>Destroying/deleting session information</b>-Remember sessions are destroyed automatically after user leaves  website or closes the browser, but if you wish to clear a session variable , you can simple use the unset() function to clean the session variable.</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
session_start();</p>
<p>unset($_SESSION["username"]);</p>
<p>unset($_SESSION["password"]);<br />
?&gt;</p>
<p>To completely destroy all session variables in one go, you can use the session_destroy() function.</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
session_destroy();<br />
?&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1216&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/29/1216/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>Retrieving Cookie</title>
		<link>http://lalumishra.wordpress.com/2010/07/25/retrieving-cookie/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/25/retrieving-cookie/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 09:43:41 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1207</guid>
		<description><![CDATA[Basis If your cookie hasn&#8217;t expired yet, let&#8217;s retrieve it from the user&#8217;s PC using the aptly named $_COOKIE associative array. The name of your stored cookie is the key and will let you retrieve your stored cookie value! Ex &#60;?php if(isset($_COOKIE['lastVisit'])) $visit = $_COOKIE['lastVisit']; echo &#8220;Your last visit was &#8211; &#8220;. $visit; ?&#62; Outline [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1207&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;"><span style="text-decoration:underline;">Basis</span></span></p>
<p>If your cookie hasn&#8217;t expired yet, let&#8217;s retrieve it from the user&#8217;s PC using the aptly named $_COOKIE associative array. The name of your stored cookie is the key and will let you retrieve your stored cookie value!</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>
&lt;?php<br />
if(isset($_COOKIE['lastVisit']))<br />
	$visit = $_COOKIE['lastVisit']; </p>
<p>echo &#8220;Your last visit was &#8211; &#8220;. $visit;<br />
?&gt;
</p>
<p><span style="color:#0000ff;"><span style="text-decoration:underline;">Outline</span></span></p>
<p>Here we have used  isset function to be sure that our &#8220;lastVisit&#8221; cookie still exists on the user&#8217;s PC, if it does, then the user&#8217;s last visit is displayed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1207/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1207&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/25/retrieving-cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating PHP Cookies</title>
		<link>http://lalumishra.wordpress.com/2010/07/25/creating-php-cookies/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/25/creating-php-cookies/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 09:32:59 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1204</guid>
		<description><![CDATA[Basis When you create a cookie, using the function setcookie, you must specify three arguments. These arguments are setcookie(name, value, expiration): 1. name: The name of your cookie. You will use this name to later retrieve your cookie. 2. value: The value that is stored in your cookie. Common values are username(string) and last visit(date). [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1204&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;"><span style="text-decoration:underline;">Basis</span></span></p>
<p>When you create a cookie, using the function setcookie, you must specify three arguments. These arguments are setcookie(name, value, expiration):</p>
<p>   1. name: The name of your cookie. You will use this name to later retrieve your cookie.<br />
   2. value: The value that is stored in your cookie. Common values are username(string) and last visit(date).<br />
   3. expiration: The date when the cookie will expire and be deleted. If you do not set this expiration date, then it will be treated as a session cookie and be removed when the browser is restarted.</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
//Calculate 60 days in the future<br />
//seconds * minutes * hours * days + current time<br />
$inTwoMonths = 60 * 60 * 24 * 60 + time();<br />
setcookie(&#8216;lastVisit&#8217;, date(&#8220;G:i &#8211; m/d/y&#8221;), $inTwoMonths);<br />
?&gt;</p>
<p><span style="color:#0000ff;"><span style="text-decoration:underline;">Outline</span></span></p>
<p>In this example we will be creating a cookie that stores the user&#8217;s last visit to measure how often people return to visit our webpage. We want to ignore people that take longer than two months to return to the site, so we will set the cookie&#8217;s expiration date to two months in the future!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1204&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/25/creating-php-cookies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Functions &#8211; Parameters</title>
		<link>http://lalumishra.wordpress.com/2010/07/24/php-functions-parameters/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/24/php-functions-parameters/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 10:22:18 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1200</guid>
		<description><![CDATA[Basis Another useful thing about functions is that you can send them information that the function can then use. Ex &#60;?php function greeting($name){ echo &#8220;Hello there &#8220;. $name . &#8220;!&#60;br /&#62;&#8221;; } greeting(&#8220;arjun&#8221;); greeting(&#8220;gopal&#8221;); greeting(&#8220;sunil); greeting(&#8220;rahul&#8221;); ?&#62; Output Hello there arjun! Hello there gopal! Hello there sunil! Hello there rahul! Outline However, if we were [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1200&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;"><span style="text-decoration:underline;">Basis</span></span></p>
<p>Another useful thing about functions is that you can send them information that the function can then use.</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
function greeting($name){<br />
    echo &#8220;Hello there &#8220;. $name . &#8220;!&lt;br /&gt;&#8221;;<br />
}<br />
greeting(&#8220;arjun&#8221;);<br />
greeting(&#8220;gopal&#8221;);<br />
greeting(&#8220;sunil);<br />
greeting(&#8220;rahul&#8221;);<br />
?&gt;</p>
<p><span style="color:#008000;"><span style="text-decoration:underline;">Output</span></span><br />
Hello there arjun!<br />
Hello there gopal!<br />
Hello there sunil!<br />
Hello there rahul! </p>
<p><span style="color:#0000ff;"><span style="text-decoration:underline;">Outline</span></span></p>
<p>However, if we were to use parameters, then we would be able to add some extra functionality! A parameter appears with the parentheses &#8220;( )&#8221; and looks just like a normal PHP variable.<br />
Here we have created a function which creates a custom greeting based off of a person&#8217;s name.Our parameter will be the person&#8217;s name and our function will concatenate this name onto a greeting string.<br />
When we use our greeting function we have to send it a string containing someone&#8217;s name, otherwise it will break.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1200&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/24/php-functions-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP &#8211; Functions</title>
		<link>http://lalumishra.wordpress.com/2010/07/24/php-functions/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/24/php-functions/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 05:12:47 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1196</guid>
		<description><![CDATA[Basis A function is just a name we give to a block of code that can be executed whenever we need it. Ex &#60;?php function myfunction(){ echo &#8220;i am in function. &#60;br /&#62;&#8221;; } echo &#8220;Hello world. &#60;br /&#62;&#8221;; myfunction(); myfunction(); ?&#62; Output Hello world. i am in function. i am in function. Outline - [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1196&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;"><span style="text-decoration:underline;">Basis</span></span></p>
<p>A function is just a name we give to a block of code that can be executed whenever we need it.</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
function myfunction(){<br />
    echo &#8220;i am in function. &lt;br /&gt;&#8221;;<br />
}<br />
echo &#8220;Hello world. &lt;br /&gt;&#8221;;<br />
myfunction();<br />
myfunction();<br />
?&gt;</p>
<p><span style="color:#008000;"><span style="text-decoration:underline;">Output</span></span></p>
<p>Hello world.<br />
i am in function.<br />
i am in function.</p>
<p><span style="color:#0000ff;"><span style="text-decoration:underline;">Outline</span></span></p>
<p>- Always start your function with the keyword function.<br />
- Remember that your function&#8217;s code must be between the &#8220;{&#8221; and the &#8220;}&#8221;.<br />
- When you are using your function, be sure you spell the function name correctly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1196&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/24/php-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>Validating Form Input: Numbers</title>
		<link>http://lalumishra.wordpress.com/2010/07/23/validating-form-input-numbers/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/23/validating-form-input-numbers/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 11:16:05 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1191</guid>
		<description><![CDATA[Basis You want to make sure a number is entered in a form input box. Ex &#60;?php if (! ctype_digit($_POST['age'])) { print &#8216;Your age must be a number bigger than or equal to zero.&#8217;; } ?&#62; Outline In this example age is checked to know whether the value entered by the user is a number [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1191&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;"><span style="text-decoration:underline;">Basis</span></span></p>
<p>You want to make sure a number is entered in a form input box.</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;">Ex</span></span></p>
<p>&lt;?php<br />
if (! ctype_digit($_POST['age'])) {<br />
    print &#8216;Your age must be a number bigger than or equal to zero.&#8217;;<br />
}<br />
?&gt;<br />
<span style="color:#0000ff;"><span style="text-decoration:underline;">Outline</span></span></p>
<p>In this example age is checked to know whether the value entered by the user is a number or not.ctype_digit() is used to validate  the form input.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1191/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1191&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/23/validating-form-input-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>Copy to Clipboard in javascript using zeroclipboard</title>
		<link>http://lalumishra.wordpress.com/2010/07/22/copy-to-clipboard-in-javascript-using-zeroclipboard/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/22/copy-to-clipboard-in-javascript-using-zeroclipboard/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 06:04:27 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1120</guid>
		<description><![CDATA[zeroclipboard After hrs of debugging able to figure out how to copy to clipboard. The solution provided by zeroclipboard seems to be working, but sometime bit time consuming to do it correctly. ZeroClipboard.setMoviePath("http://localhost/js/ZeroClipboard.swf'); var clipArr = new ZeroClipboard.Client(); clipArr.setText("Your string interested to copy") ; clipArr.setHandCursor( true ); clipArr.glue( 'copy-img' ); HTML snippet &#60;img src=&#8221;clickme.png&#8221; alt=&#8221;" [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1120&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/zeroclipboard/">zeroclipboard</a><br />
After hrs of debugging able to figure out how to copy to clipboard. The solution provided by zeroclipboard seems to be working, but sometime bit time consuming to do it correctly.</p>
<p><code><br />
ZeroClipboard.setMoviePath("http://localhost/js/ZeroClipboard.swf');<br />
var clipArr = new ZeroClipboard.Client();<br />
clipArr.setText("Your string interested to copy") ;<br />
clipArr.setHandCursor( true );<br />
clipArr.glue( 'copy-img' );<br />
</code></p>
<p>HTML snippet<br />
&lt;img src=&#8221;clickme.png&#8221; alt=&#8221;" /&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1120&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/22/copy-to-clipboard-in-javascript-using-zeroclipboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>what is views in Codeigniter</title>
		<link>http://lalumishra.wordpress.com/2010/07/18/what-is-views-in-codeigniter/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/18/what-is-views-in-codeigniter/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 09:58:03 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[beginer tutorial]]></category>
		<category><![CDATA[Beginers]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[web developement]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1164</guid>
		<description><![CDATA[Basis views are resposnsible for showing the final out as HTML page.Views are loaded in controller to work on.we can have multiple view files like header,footer,index etc.Below is a simple example of creating a view file.after creating save this in your application/views/ folder. Ex &#60;html&#62; &#60;head&#62; &#60;title&#62;creating view file&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;h1&#62;It is my view [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1164&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#000000;"><span style="text-decoration:underline;"><span style="color:#ff0000;">Basis</span></span></span></p>
<p><span style="color:#000000;"><span style="color:#000000;">views are resposnsible for showing the final out as HTML page.Views are loaded in controller to work on.we can have multiple view files like header,footer,index etc.Below is a simple example of creating a view file.after creating save this in your application/views/ folder.</span></span></p>
<p><span style="color:#000000;"><span style="color:#000000;"><span style="color:#ff0000;"><span style="text-decoration:underline;">Ex</span></span></span></span></p>
<p><span style="color:#000000;"><span style="color:#000000;"> </span></span></p>
<div id="_mcePaste">
<div id="_mcePaste">&lt;html&gt;</div>
<div id="_mcePaste">&lt;head&gt;</div>
<div id="_mcePaste">&lt;title&gt;creating view file&lt;/title&gt;</div>
<div id="_mcePaste">&lt;/head&gt;</div>
<div id="_mcePaste">&lt;body&gt;</div>
<div id="_mcePaste">&lt;h1&gt;It is my view file&lt;/h1&gt;</div>
<div id="_mcePaste">&lt;/body&gt;</div>
<div id="_mcePaste">&lt;/html&gt;</div>
<div></div>
<div>//loading view file</div>
<div>
<div></div>
<div>&lt;?php</div>
<div>class User extends Controller {</div>
<div></div>
<div>function index()</div>
<div>{</div>
<div>$this-&gt;load-&gt;view(&#8216;user_view&#8217;);</div>
<div>}</div>
<div>}</div>
<div>?&gt;</div>
<div><span style="color:#ff0000;"><span style="text-decoration:underline;"><span style="color:#ff0000;">Outline</span></span></span></div>
<div>once the view file is done we should call like this under our controller.Now we can access the page in this path- example.com/index.php/user/</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1164&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/18/what-is-views-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
		<item>
		<title>What is Models in codeigniter</title>
		<link>http://lalumishra.wordpress.com/2010/07/18/what-is-models-in-codeigniter/</link>
		<comments>http://lalumishra.wordpress.com/2010/07/18/what-is-models-in-codeigniter/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 09:50:42 +0000</pubDate>
		<dc:creator>lalu</dc:creator>
				<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[beginer tutorial]]></category>
		<category><![CDATA[Beginers]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[web developement]]></category>

		<guid isPermaLink="false">http://lalumishra.wordpress.com/?p=1162</guid>
		<description><![CDATA[Basis Models are optionally stored, if you want you can ignore it also.These are designed to work with  database query like insert,update,create,delete and database information.Suppose you want to insert your form data in your database.Just create a model look like below in your model folder. Ex class Entry extends Model { var $name   = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1162&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration:underline;"><span style="color:#ff0000;">Basis</span></span></p>
<p>Models are optionally stored, if you want you can ignore it also.These are designed to work with  database query like insert,update,create,delete and database information.Suppose you want to insert your form data in your database.Just create a model look like below in your model folder.</p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;"><span style="color:#ff6600;">Ex</span></span></span></p>
<p><span style="color:#ff6600;"><span style="text-decoration:underline;"><span style="color:#ff6600;"> </span></span></span></p>
<p><span style="text-decoration:underline;"><span style="text-decoration:underline;"> </span></span></p>
<div id="_mcePaste">
<div id="_mcePaste">class Entry extends Model {</div>
<div id="_mcePaste">var $name   = &#8221;;</div>
<div id="_mcePaste">var $password = &#8221;;</div>
<div id="_mcePaste">var $email    = &#8221;;</div>
<div id="_mcePaste">function Entry()</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">parent::Model();</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">function insert_data()</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">$this-&gt;title   = $_POST['name'];</div>
<div id="_mcePaste">$this-&gt;content = $_POST['password'];</div>
<div id="_mcePaste">$this-&gt;content = $_POST['email'];</div>
<div id="_mcePaste">$this-&gt;db-&gt;insert(&#8216;user&#8217;, $this);</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">}</div>
<div><span style="color:#0000ff;"><span style="text-decoration:underline;">Outline</span></span></div>
<div><span style="color:#0000ff;"></p>
<div><span style="color:#000000;">Here entry is the name of your class. Class names must start with  capital letter with the rest of the name lowercase. Make sure your class extends the base Model class.</span></div>
<div><span style="color:#000000;">The file name will be a lower case following the file name.Then we have defined a function to insert data.$_POST is used to get retrieve the form data.</span></div>
<div><span style="color:#000000;">Once the model is ready we should load it in controller to work properly.</span></div>
<div></div>
<div><span style="color:#ff6600;"><span style="text-decoration:underline;">ex</span></span></div>
<div><span style="color:#000000;"></p>
<div>class user extends Controller {</div>
<div></div>
<div>function blog()</div>
<div>{</div>
<div>$this-&gt;load-&gt;model(&#8216;entry&#8217;);</div>
<div></div>
<div>$data['query'] = $this-&gt;entry-&gt;insert_data();</div>
<div></div>
<div></div>
<div>}</div>
<div>}</div>
<p></span></div>
<div><span style="color:#000000;"><span style="color:#ff6600;"><span style="text-decoration:underline;"><span style="color:#ff6600;"></p>
<div><span style="color:#000000;"><br />
</span></div>
<p></span></span></span></span></div>
<p></span></div>
<div><span style="text-decoration:underline;"><span style="color:#0000ff;"><br />
</span></span></div>
<div></div>
<div><span style="color:#0000ff;"><span style="text-decoration:underline;"><br />
</span></span></div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalumishra.wordpress.com/1162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalumishra.wordpress.com/1162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalumishra.wordpress.com/1162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalumishra.wordpress.com/1162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalumishra.wordpress.com/1162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalumishra.wordpress.com/1162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalumishra.wordpress.com/1162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalumishra.wordpress.com/1162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalumishra.wordpress.com/1162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalumishra.wordpress.com/1162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalumishra.wordpress.com/1162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalumishra.wordpress.com/1162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalumishra.wordpress.com/1162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalumishra.wordpress.com/1162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalumishra.wordpress.com&amp;blog=14169933&amp;post=1162&amp;subd=lalumishra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalumishra.wordpress.com/2010/07/18/what-is-models-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48da83663cf98d0f228ae3799679d814?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lalumishra</media:title>
		</media:content>
	</item>
	</channel>
</rss>
