<?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>Easy Tutorials &#187; PHP</title>
	<atom:link href="http://www.easytutorial.info/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.easytutorial.info</link>
	<description>Web Design Tutorial Blog</description>
	<lastBuildDate>Mon, 05 Jan 2009 19:38:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Php error handling</title>
		<link>http://www.easytutorial.info/99/php-error-handling/</link>
		<comments>http://www.easytutorial.info/99/php-error-handling/#comments</comments>
		<pubDate>Tue, 27 May 2008 05:04:36 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[handling]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/?p=99</guid>
		<description><![CDATA[Sometimes we need to set our own errors rather than the default one like this. Warning: fopen(test.txt) [function.fopen]: failed to open stream: No such file or directory in http://localhost/index.php on line 2 it is good when you create scripts and sell Creating a basic error handler using the die function !! if(!file_exists(&#8220;text.txt&#8221;)) { die(&#8220;File does [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we need to set our own errors rather than the default one like this.</p>
<blockquote><p>Warning: fopen(test.txt) [function.fopen]: failed to open stream: No such file or directory in http://localhost/index.php on line 2</p></blockquote>
<p>it is good when you create scripts and sell</p>
<p><strong>Creating a basic error handler using the die function !!</strong></p>
<p>if(!file_exists(&#8220;text.txt&#8221;))<br />
{<br />
die(&#8220;File does not exist&#8221;);<br />
}<br />
else<br />
{<br />
$file=fopen(&#8220;text.txt&#8221;,&#8221;r&#8221;);<br />
}<br />
?&gt;</p>
<p><strong>Set error handler</strong></p>
<p>Error handlers are set using</p>
<p>set_error_handler(&#8220;MyErrors&#8221;);</p>
<p><em>Syntax:</em></p>
<p>&lt;?php</p>
<p>function myerror($var1, $var2)<br />
{<br />
echo &#8220;&lt;b&gt;Error:&lt;/b&gt; [$var1] $var2&#8243;;<br />
}</p>
<p>set_error_handler(&#8220;myerror&#8221;);</p>
<p>echo($var);<br />
?&gt;</p>
<p>Error will be</p>
<blockquote><p><strong>Error:</strong> [8] Undefined variable: var</p></blockquote>
<p>Thanks</p>
<p>krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;title=Php%20error%20handling&amp;bodytext=Sometimes%20we%20need%20to%20set%20our%20own%20errors%20rather%20than%20the%20default%20one%20like%20this.%0D%0AWarning%3A%20fopen%28test.txt%29%20%5Bfunction.fopen%5D%3A%20failed%20to%20open%20stream%3A%20No%20such%20file%20or%20directory%20in%20http%3A%2F%2Flocalhost%2Findex.php%20on%20line%202%0D%0Ait%20is%20good%20when%20you%20create%20scripts%20an" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;title=Php%20error%20handling&amp;notes=Sometimes%20we%20need%20to%20set%20our%20own%20errors%20rather%20than%20the%20default%20one%20like%20this.%0D%0AWarning%3A%20fopen%28test.txt%29%20%5Bfunction.fopen%5D%3A%20failed%20to%20open%20stream%3A%20No%20such%20file%20or%20directory%20in%20http%3A%2F%2Flocalhost%2Findex.php%20on%20line%202%0D%0Ait%20is%20good%20when%20you%20create%20scripts%20an" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;t=Php%20error%20handling" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;h=Php%20error%20handling" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;title=Php%20error%20handling" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;title=Php%20error%20handling" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;title=Php%20error%20handling&amp;annotation=Sometimes%20we%20need%20to%20set%20our%20own%20errors%20rather%20than%20the%20default%20one%20like%20this.%0D%0AWarning%3A%20fopen%28test.txt%29%20%5Bfunction.fopen%5D%3A%20failed%20to%20open%20stream%3A%20No%20such%20file%20or%20directory%20in%20http%3A%2F%2Flocalhost%2Findex.php%20on%20line%202%0D%0Ait%20is%20good%20when%20you%20create%20scripts%20an" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;submitHeadline=Php%20error%20handling&amp;submitSummary=Sometimes%20we%20need%20to%20set%20our%20own%20errors%20rather%20than%20the%20default%20one%20like%20this.%0D%0AWarning%3A%20fopen%28test.txt%29%20%5Bfunction.fopen%5D%3A%20failed%20to%20open%20stream%3A%20No%20such%20file%20or%20directory%20in%20http%3A%2F%2Flocalhost%2Findex.php%20on%20line%202%0D%0Ait%20is%20good%20when%20you%20create%20scripts%20an&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;title=Php%20error%20handling" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;title=Php%20error%20handling&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=Sometimes%20we%20need%20to%20set%20our%20own%20errors%20rather%20than%20the%20default%20one%20like%20this.%0D%0AWarning%3A%20fopen%28test.txt%29%20%5Bfunction.fopen%5D%3A%20failed%20to%20open%20stream%3A%20No%20such%20file%20or%20directory%20in%20http%3A%2F%2Flocalhost%2Findex.php%20on%20line%202%0D%0Ait%20is%20good%20when%20you%20create%20scripts%20an" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F99%2Fphp-error-handling%2F&amp;t=Php%20error%20handling" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/99/php-error-handling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>opening and extracting a zip file</title>
		<link>http://www.easytutorial.info/90/opening-and-extracting-a-zip-file/</link>
		<comments>http://www.easytutorial.info/90/opening-and-extracting-a-zip-file/#comments</comments>
		<pubDate>Thu, 01 May 2008 13:47:59 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[A]]></category>
		<category><![CDATA[and]]></category>
		<category><![CDATA[extracting]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[opening]]></category>
		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/?p=90</guid>
		<description><![CDATA[Well zipping is not a php function. For the zipping functions to work on your server you must download the Download the ZZIPlib library Download the Zip PELC extension And install them ( find the instruction there only on how to ) The example i am going to tell is a simple one &#60;?php $zipfile [...]]]></description>
			<content:encoded><![CDATA[<p>Well zipping is not a php function. For the zipping functions to work on your server you must download the</p>
<p><a href="http://zziplib.sourceforge.net/download.html" target="_blank">Download the ZZIPlib  	library</a></p>
<p><a href="http://snaps.php.net/" target="_blank">Download the Zip  	PELC extension</a></p>
<p>And install them ( find the instruction there only on how to )</p>
<p>The example i am going to tell is a simple one</p>
<p>&lt;?php<br />
$zipfile <span class="keyword">= new </span><span class="default">ZipArchive</span><span class="keyword">;<br />
</span><span class="default">$zip</span><span class="keyword">file-&gt;</span><span class="default">open</span><span class="keyword">(</span><span class="string">&#8216;file.zip&#8217;</span><span class="keyword">);<br />
</span><span class="default">$zip</span><span class="keyword">file-&gt;</span><span class="default">extractTo</span><span class="keyword">(</span><span class="string">&#8216;./&#8217;</span><span class="keyword">);<br />
</span><span class="default">$zip</span><span class="keyword">file-&gt;</span><span class="default">close</span><span class="keyword">();<br />
echo </span><span class="string">&#8220;the requested file has been extracted&#8221;</span><span class="keyword">;<br />
</span><span class="default">?&gt;</span></p>
<p>open = open the specified zip file inside the braces</p>
<p>extractTo = extract the opened zip file to the location specified</p>
<p>close = closes a zip file</p>
<p>Thanks</p>
<p>krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;title=opening%20and%20extracting%20a%20zip%20file&amp;bodytext=Well%20zipping%20is%20not%20a%20php%20function.%20For%20the%20zipping%20functions%20to%20work%20on%20your%20server%20you%20must%20download%20the%0D%0A%0D%0ADownload%20the%20ZZIPlib%20%20%09library%0D%0A%0D%0ADownload%20the%20Zip%20%20%09PELC%20extension%0D%0A%0D%0AAnd%20install%20them%20%28%20find%20the%20instruction%20there%20only%20on%20how%20to%20%29%0D%0A%0D%0AThe" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;title=opening%20and%20extracting%20a%20zip%20file&amp;notes=Well%20zipping%20is%20not%20a%20php%20function.%20For%20the%20zipping%20functions%20to%20work%20on%20your%20server%20you%20must%20download%20the%0D%0A%0D%0ADownload%20the%20ZZIPlib%20%20%09library%0D%0A%0D%0ADownload%20the%20Zip%20%20%09PELC%20extension%0D%0A%0D%0AAnd%20install%20them%20%28%20find%20the%20instruction%20there%20only%20on%20how%20to%20%29%0D%0A%0D%0AThe" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;t=opening%20and%20extracting%20a%20zip%20file" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;h=opening%20and%20extracting%20a%20zip%20file" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;title=opening%20and%20extracting%20a%20zip%20file" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;title=opening%20and%20extracting%20a%20zip%20file" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;title=opening%20and%20extracting%20a%20zip%20file&amp;annotation=Well%20zipping%20is%20not%20a%20php%20function.%20For%20the%20zipping%20functions%20to%20work%20on%20your%20server%20you%20must%20download%20the%0D%0A%0D%0ADownload%20the%20ZZIPlib%20%20%09library%0D%0A%0D%0ADownload%20the%20Zip%20%20%09PELC%20extension%0D%0A%0D%0AAnd%20install%20them%20%28%20find%20the%20instruction%20there%20only%20on%20how%20to%20%29%0D%0A%0D%0AThe" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;submitHeadline=opening%20and%20extracting%20a%20zip%20file&amp;submitSummary=Well%20zipping%20is%20not%20a%20php%20function.%20For%20the%20zipping%20functions%20to%20work%20on%20your%20server%20you%20must%20download%20the%0D%0A%0D%0ADownload%20the%20ZZIPlib%20%20%09library%0D%0A%0D%0ADownload%20the%20Zip%20%20%09PELC%20extension%0D%0A%0D%0AAnd%20install%20them%20%28%20find%20the%20instruction%20there%20only%20on%20how%20to%20%29%0D%0A%0D%0AThe&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;title=opening%20and%20extracting%20a%20zip%20file" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;title=opening%20and%20extracting%20a%20zip%20file&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=Well%20zipping%20is%20not%20a%20php%20function.%20For%20the%20zipping%20functions%20to%20work%20on%20your%20server%20you%20must%20download%20the%0D%0A%0D%0ADownload%20the%20ZZIPlib%20%20%09library%0D%0A%0D%0ADownload%20the%20Zip%20%20%09PELC%20extension%0D%0A%0D%0AAnd%20install%20them%20%28%20find%20the%20instruction%20there%20only%20on%20how%20to%20%29%0D%0A%0D%0AThe" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F90%2Fopening-and-extracting-a-zip-file%2F&amp;t=opening%20and%20extracting%20a%20zip%20file" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/90/opening-and-extracting-a-zip-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Search Engine For Your Site</title>
		<link>http://www.easytutorial.info/69/free-search-engine-for-your-site/</link>
		<comments>http://www.easytutorial.info/69/free-search-engine-for-your-site/#comments</comments>
		<pubDate>Sun, 17 Feb 2008 12:59:31 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/php/free-search-engine-for-your-site</guid>
		<description><![CDATA[TSEP is a simple, yet very powerful and fast PHP website search engine. It is built to index your site so it can be searched later within seconds. Some features: your own stopwords, logging, MySQL Boolean search, many languages, CSS formating. Overview TSEP is a search engine for a website &#8211; for your website! You [...]]]></description>
			<content:encoded><![CDATA[<p>TSEP is a simple, yet very powerful and fast PHP website search engine. It is built to index your site so it can be searched later within seconds. Some features: your own stopwords, logging, MySQL Boolean search, many languages, CSS formating.</p>
<h2><a name="overview" title="overview" id="overview"></a>Overview</h2>
<ul>
<li><span class="tsep">TSEP</span> is a search engine for a website &#8211; for <span class="importantNote">your</span> website!<br />
You can put a &#8220;Search this site&#8221; anywhere on your website and let people quickly find what they are looking for.</li>
<li><span class="tsep">TSEP</span> is free of charge and open source software.</li>
<li><span class="tsep">TSEP</span> is designed to be <span class="importantNote">very easy to install and use</span>.</li>
<li><span class="tsep">TSEP</span> can be implemented <span class="importantNote">into your layout </span>(there is also a pre-made search page available)<br />
With only two lines of code you can add <span class="tsep">TSEP</span> to your website <span class="importantNote">and</span> into your layout!</li>
<li><span class="tsep">TSEP</span> uses <span class="importantNote">CSS for formatting</span>.<br />
You can adjust any color, font, anything of the look to your needs.</li>
<li><span class="tsep">TSEP</span> uses <span class="importantNote">indexing profiles</span>.<br />
The profiles enable you to split the indexing (and in future also the searching) process.</li>
<li><span class="tsep">TSEP</span> is <span class="importantNote">localized</span>!<br />
This means if you are running a website in the English language you will probably want to show the search page as well in English &#8211; you can do this with <span class="tsep">TSEP</span> very easily. If you are running a website in German you can see the <span class="tsep">TSEP</span> messages in German. French, Spanish, Italian, Thai, Chinese, Russian&#8230; . None of those should be a problem for <span class="tsep">TSEP</span>.</li>
<li><span class="tsep">TSEP</span> supports (MySQL-) Boolean search terms.</li>
</ul>
<p>Website &#8211; <a href="http://tsep.info/cms/" target="_blank">http://tsep.info/cms/</a><br />
Thanks</p>
<p>krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;title=Free%20Search%20Engine%20For%20Your%20Site&amp;bodytext=TSEP%20is%20a%20simple%2C%20yet%20very%20powerful%20and%20fast%20PHP%20website%20search%20engine.%20It%20is%20built%20to%20index%20your%20site%20so%20it%20can%20be%20searched%20later%20within%20seconds.%20Some%20features%3A%20your%20own%20stopwords%2C%20logging%2C%20MySQL%20Boolean%20search%2C%20many%20languages%2C%20CSS%20formating.%0D%0AOverv" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;title=Free%20Search%20Engine%20For%20Your%20Site&amp;notes=TSEP%20is%20a%20simple%2C%20yet%20very%20powerful%20and%20fast%20PHP%20website%20search%20engine.%20It%20is%20built%20to%20index%20your%20site%20so%20it%20can%20be%20searched%20later%20within%20seconds.%20Some%20features%3A%20your%20own%20stopwords%2C%20logging%2C%20MySQL%20Boolean%20search%2C%20many%20languages%2C%20CSS%20formating.%0D%0AOverv" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;t=Free%20Search%20Engine%20For%20Your%20Site" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;h=Free%20Search%20Engine%20For%20Your%20Site" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;title=Free%20Search%20Engine%20For%20Your%20Site" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;title=Free%20Search%20Engine%20For%20Your%20Site" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;title=Free%20Search%20Engine%20For%20Your%20Site&amp;annotation=TSEP%20is%20a%20simple%2C%20yet%20very%20powerful%20and%20fast%20PHP%20website%20search%20engine.%20It%20is%20built%20to%20index%20your%20site%20so%20it%20can%20be%20searched%20later%20within%20seconds.%20Some%20features%3A%20your%20own%20stopwords%2C%20logging%2C%20MySQL%20Boolean%20search%2C%20many%20languages%2C%20CSS%20formating.%0D%0AOverv" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;submitHeadline=Free%20Search%20Engine%20For%20Your%20Site&amp;submitSummary=TSEP%20is%20a%20simple%2C%20yet%20very%20powerful%20and%20fast%20PHP%20website%20search%20engine.%20It%20is%20built%20to%20index%20your%20site%20so%20it%20can%20be%20searched%20later%20within%20seconds.%20Some%20features%3A%20your%20own%20stopwords%2C%20logging%2C%20MySQL%20Boolean%20search%2C%20many%20languages%2C%20CSS%20formating.%0D%0AOverv&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;title=Free%20Search%20Engine%20For%20Your%20Site" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;title=Free%20Search%20Engine%20For%20Your%20Site&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=TSEP%20is%20a%20simple%2C%20yet%20very%20powerful%20and%20fast%20PHP%20website%20search%20engine.%20It%20is%20built%20to%20index%20your%20site%20so%20it%20can%20be%20searched%20later%20within%20seconds.%20Some%20features%3A%20your%20own%20stopwords%2C%20logging%2C%20MySQL%20Boolean%20search%2C%20many%20languages%2C%20CSS%20formating.%0D%0AOverv" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F69%2Ffree-search-engine-for-your-site%2F&amp;t=Free%20Search%20Engine%20For%20Your%20Site" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/69/free-search-engine-for-your-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Echoing the user input through php</title>
		<link>http://www.easytutorial.info/57/echoing-the-user-input-through-php/</link>
		<comments>http://www.easytutorial.info/57/echoing-the-user-input-through-php/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 16:05:30 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/php/echoing-the-user-input-through-php</guid>
		<description><![CDATA[Php is very powerful when it comes to handling of forms. It can check user input check for illegal characters and can also help in uploading of files. Which i am going to teach you in later chapters. But for today we are going to study how to how to echo user input. form.php &#60;html&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Php is very powerful when it comes to handling of forms. It can check user input check for illegal characters and can also help in uploading of files. Which i am going to teach you in later chapters. But for today we are going to study how to how to echo user input.</p>
<p><span id="more-57"></span></p>
<p><strong>form.php</strong></p>
<p>&lt;html&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;form action=&#8221;process.php&#8221; method=&#8221;get&#8221;&gt;</p>
<p>&lt;input type=&#8221;text&#8221; name=&#8221;textfield&#8221; /&gt;</p>
<p>&lt;/form&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p>
<p><strong>process.php</strong></p>
<p>&lt;html&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;?php</p>
<p>$something=&#8221;$_['textfield']&#8220;;</p>
<p>echo $something;</p>
<p>?&gt;</p>
<p>&lt;/form&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p>
<p>Thanks</p>
<p>krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;title=Echoing%20the%20user%20input%20through%20php&amp;bodytext=Php%20is%20very%20powerful%20when%20it%20comes%20to%20handling%20of%20forms.%20It%20can%20check%20user%20input%20check%20for%20illegal%20characters%20and%20can%20also%20help%20in%20uploading%20of%20files.%20Which%20i%20am%20going%20to%20teach%20you%20in%20later%20chapters.%20But%20for%20today%20we%20are%20going%20to%20study%20how%20to%20how%20to%20" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;title=Echoing%20the%20user%20input%20through%20php&amp;notes=Php%20is%20very%20powerful%20when%20it%20comes%20to%20handling%20of%20forms.%20It%20can%20check%20user%20input%20check%20for%20illegal%20characters%20and%20can%20also%20help%20in%20uploading%20of%20files.%20Which%20i%20am%20going%20to%20teach%20you%20in%20later%20chapters.%20But%20for%20today%20we%20are%20going%20to%20study%20how%20to%20how%20to%20" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;t=Echoing%20the%20user%20input%20through%20php" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;h=Echoing%20the%20user%20input%20through%20php" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;title=Echoing%20the%20user%20input%20through%20php" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;title=Echoing%20the%20user%20input%20through%20php" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;title=Echoing%20the%20user%20input%20through%20php&amp;annotation=Php%20is%20very%20powerful%20when%20it%20comes%20to%20handling%20of%20forms.%20It%20can%20check%20user%20input%20check%20for%20illegal%20characters%20and%20can%20also%20help%20in%20uploading%20of%20files.%20Which%20i%20am%20going%20to%20teach%20you%20in%20later%20chapters.%20But%20for%20today%20we%20are%20going%20to%20study%20how%20to%20how%20to%20" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;submitHeadline=Echoing%20the%20user%20input%20through%20php&amp;submitSummary=Php%20is%20very%20powerful%20when%20it%20comes%20to%20handling%20of%20forms.%20It%20can%20check%20user%20input%20check%20for%20illegal%20characters%20and%20can%20also%20help%20in%20uploading%20of%20files.%20Which%20i%20am%20going%20to%20teach%20you%20in%20later%20chapters.%20But%20for%20today%20we%20are%20going%20to%20study%20how%20to%20how%20to%20&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;title=Echoing%20the%20user%20input%20through%20php" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;title=Echoing%20the%20user%20input%20through%20php&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=Php%20is%20very%20powerful%20when%20it%20comes%20to%20handling%20of%20forms.%20It%20can%20check%20user%20input%20check%20for%20illegal%20characters%20and%20can%20also%20help%20in%20uploading%20of%20files.%20Which%20i%20am%20going%20to%20teach%20you%20in%20later%20chapters.%20But%20for%20today%20we%20are%20going%20to%20study%20how%20to%20how%20to%20" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F57%2Fechoing-the-user-input-through-php%2F&amp;t=Echoing%20the%20user%20input%20through%20php" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/57/echoing-the-user-input-through-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying random advertisement through php</title>
		<link>http://www.easytutorial.info/37/displaying-random-advertisement-through-php/</link>
		<comments>http://www.easytutorial.info/37/displaying-random-advertisement-through-php/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 09:07:50 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/php/displaying-random-advertisement-through-php</guid>
		<description><![CDATA[&#160; Sometimes you want to display something randomlythis tutorial is going to teach how to display two company advertisement on the same page like google and bidvertiser. Syntax: &#60;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&#62; &#60;html xmlns=”http://www.w3.org/1999/xhtml”&#62; &#60;head&#62; &#60;meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /&#62; &#60;title&#62;Untitled Document&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;?php $a = rand (1,2); if ($a [...]]]></description>
			<content:encoded><![CDATA[<h2 id="post-36"></h2>
<p class="postspace2">&nbsp;</p>
<p><!--content with more link-->Sometimes you want to display something randomlythis tutorial is going to teach how to display two company advertisement on the same page like google and bidvertiser.</p>
<p><strong>Syntax:</strong></p>
<h6><font color="#008000">&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;</font></h6>
<h6><font color="#008000">&lt;html xmlns=”http://www.w3.org/1999/xhtml”&gt;</font></h6>
<h6><font color="#008000">&lt;head&gt;</font></h6>
<h6><font color="#008000">&lt;meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /&gt;</font></h6>
<h6><font color="#008000">&lt;title&gt;Untitled Document&lt;/title&gt;</font></h6>
<h6><font color="#008000">&lt;/head&gt;</font></h6>
<h6><font color="#008000">&lt;body&gt;</font></h6>
<h6><font color="#ff0000">&lt;?php</font></h6>
<h6><font color="#ff0000">$a =  rand (1,2);</font></h6>
<h6><font color="#ff0000">if ($a == “1″) {</font></h6>
<h6><font color="#ff0000">?&gt;</font></h6>
<h6><font color="#008000">&lt;script type=”text/javascript”&gt;</font></h6>
<h6><font color="#008000">&lt;!–</font></h6>
<h6><font color="#008000">google_ad_client = “”;</font></h6>
<h6><font color="#008000">//728×90, created 12/31/07</font></h6>
<h6><font color="#008000">google_ad_slot = “1167745697″;</font></h6>
<h6><font color="#008000">google_ad_width = 728;</font></h6>
<h6><font color="#008000">google_ad_height = 90;</font></h6>
<h6><font color="#008000">//–&gt;</font></h6>
<h6><font color="#008000">&lt;/script&gt;</font></h6>
<h6><font color="#008000">&lt;script type=”text/javascript”</font></h6>
<h6><font color="#008000">src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;</font></h6>
<h6><font color="#008000">&lt;/script&gt;</font></h6>
<h6><font color="#ff0000">&lt;?php</font></h6>
<h6><font color="#ff0000">}</font></h6>
<h6><font color="#ff0000">if ($a == “2″) { </font></h6>
<h6><font color="#ff0000">?&gt;</font></h6>
<h6><font color="#008000">&lt;!– Begin BidVertiser code –&gt;</font></h6>
<h6><font color="#008000">&lt;SCRIPT LANGUAGE=”JavaScript1.1″ src=”http://bdv.bidvertiser.com/BidVertiser.dbm?pid=&amp;bid=” type=”text/javascript”&gt;&lt;/SCRIPT&gt;</font></h6>
<h6><font color="#008000">&lt;noscript&gt;&lt;a href=”http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm”&gt;pay per click&lt;/a&gt;&lt;/noscript&gt;</font></h6>
<h6><font color="#008000">&lt;!– End BidVertiser code –&gt;</font></h6>
<h6><font color="#ff0000">&lt;?php</font></h6>
<p><font color="#ff0000">} </font></p>
<h6><font color="#ff0000">?&gt;</font></h6>
<h6><font color="#008000">&lt;/body&gt;</font></h6>
<h6><font color="#008000">&lt;/html&gt;</font></h6>
<p>You must have understand now that we assign a randomly between 1 and 2 and then check if  a = 1 then display google advertisement and if a = 2 then display bidvertiser advertisement.</p>
<p>Thanks</p>
<p>krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;title=Displaying%20random%20advertisement%20through%20php&amp;bodytext=%0D%0A%0D%0A%26nbsp%3B%0D%0ASometimes%20you%20want%20to%20display%20something%20randomlythis%20tutorial%20is%20going%20to%20teach%20how%20to%20display%20two%20company%20advertisement%20on%20the%20same%20page%20like%20google%20and%20bidvertiser.%0D%0A%0D%0ASyntax%3A%0D%0A%26lt%3B%21DOCTYPE%20html%20PUBLIC%20%E2%80%9C-%2F%2FW3C%2F%2FDTD%20XHTML%201.0%20Transitio" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;title=Displaying%20random%20advertisement%20through%20php&amp;notes=%0D%0A%0D%0A%26nbsp%3B%0D%0ASometimes%20you%20want%20to%20display%20something%20randomlythis%20tutorial%20is%20going%20to%20teach%20how%20to%20display%20two%20company%20advertisement%20on%20the%20same%20page%20like%20google%20and%20bidvertiser.%0D%0A%0D%0ASyntax%3A%0D%0A%26lt%3B%21DOCTYPE%20html%20PUBLIC%20%E2%80%9C-%2F%2FW3C%2F%2FDTD%20XHTML%201.0%20Transitio" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;t=Displaying%20random%20advertisement%20through%20php" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;h=Displaying%20random%20advertisement%20through%20php" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;title=Displaying%20random%20advertisement%20through%20php" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;title=Displaying%20random%20advertisement%20through%20php" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;title=Displaying%20random%20advertisement%20through%20php&amp;annotation=%0D%0A%0D%0A%26nbsp%3B%0D%0ASometimes%20you%20want%20to%20display%20something%20randomlythis%20tutorial%20is%20going%20to%20teach%20how%20to%20display%20two%20company%20advertisement%20on%20the%20same%20page%20like%20google%20and%20bidvertiser.%0D%0A%0D%0ASyntax%3A%0D%0A%26lt%3B%21DOCTYPE%20html%20PUBLIC%20%E2%80%9C-%2F%2FW3C%2F%2FDTD%20XHTML%201.0%20Transitio" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;submitHeadline=Displaying%20random%20advertisement%20through%20php&amp;submitSummary=%0D%0A%0D%0A%26nbsp%3B%0D%0ASometimes%20you%20want%20to%20display%20something%20randomlythis%20tutorial%20is%20going%20to%20teach%20how%20to%20display%20two%20company%20advertisement%20on%20the%20same%20page%20like%20google%20and%20bidvertiser.%0D%0A%0D%0ASyntax%3A%0D%0A%26lt%3B%21DOCTYPE%20html%20PUBLIC%20%E2%80%9C-%2F%2FW3C%2F%2FDTD%20XHTML%201.0%20Transitio&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;title=Displaying%20random%20advertisement%20through%20php" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;title=Displaying%20random%20advertisement%20through%20php&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=%0D%0A%0D%0A%26nbsp%3B%0D%0ASometimes%20you%20want%20to%20display%20something%20randomlythis%20tutorial%20is%20going%20to%20teach%20how%20to%20display%20two%20company%20advertisement%20on%20the%20same%20page%20like%20google%20and%20bidvertiser.%0D%0A%0D%0ASyntax%3A%0D%0A%26lt%3B%21DOCTYPE%20html%20PUBLIC%20%E2%80%9C-%2F%2FW3C%2F%2FDTD%20XHTML%201.0%20Transitio" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F37%2Fdisplaying-random-advertisement-through-php%2F&amp;t=Displaying%20random%20advertisement%20through%20php" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/37/displaying-random-advertisement-through-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting to a database</title>
		<link>http://www.easytutorial.info/28/connecting-to-a-database/</link>
		<comments>http://www.easytutorial.info/28/connecting-to-a-database/#comments</comments>
		<pubDate>Wed, 19 Dec 2007 01:01:44 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/?p=28</guid>
		<description><![CDATA[Connecting to a database through php is not a tough task. First off all create a new sql database in phpmyadmin and see the privileges section in it for the user/pass by default it is Username == &#8220;root&#8221; Password == &#8220;&#8221; In php you need this and your host name it is always localhost Syntax: [...]]]></description>
			<content:encoded><![CDATA[<p>Connecting to a database through php is not a tough task.</p>
<p>First off all create a new sql database in phpmyadmin and see the privileges section in it for the user/pass by default it is</p>
<p>Username == &#8220;root&#8221;</p>
<p>Password == &#8220;&#8221;</p>
<p>In php you need this and your host name it is always localhost</p>
<p><strong> Syntax:</strong></p>
<p><code><br />
$host = "localhost";  //Host name<br />
$username = "root"; // Username<br />
$pass = ""; //Password<br />
$dbname = "useless"; //Database Name</code></p>
<p>$connect = mysqli_connect ($host,$username,$pass,$dbname);<br />
if(! $connect)<br />
{<br />
echo &#8220;unable to connect to the database&#8221;;<br />
}<br />
else{<br />
echo &#8220;Connected to database&#8221;;<br />
}<br />
?&gt;<br />
The above script will connect you to the database note you must php 5<br />
because it uses mysqli functions</p>
<p>Thanks<br />
krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;title=Connecting%20to%20a%20database&amp;bodytext=Connecting%20to%20a%20database%20through%20php%20is%20not%20a%20tough%20task.%0D%0A%0D%0AFirst%20off%20all%20create%20a%20new%20sql%20database%20in%20phpmyadmin%20and%20see%20the%20privileges%20section%20in%20it%20for%20the%20user%2Fpass%20by%20default%20it%20is%0D%0A%0D%0AUsername%20%3D%3D%20%22root%22%0D%0A%0D%0APassword%20%3D%3D%20%22%22%0D%0A%0D%0AIn%20php%20you%20need%20this" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;title=Connecting%20to%20a%20database&amp;notes=Connecting%20to%20a%20database%20through%20php%20is%20not%20a%20tough%20task.%0D%0A%0D%0AFirst%20off%20all%20create%20a%20new%20sql%20database%20in%20phpmyadmin%20and%20see%20the%20privileges%20section%20in%20it%20for%20the%20user%2Fpass%20by%20default%20it%20is%0D%0A%0D%0AUsername%20%3D%3D%20%22root%22%0D%0A%0D%0APassword%20%3D%3D%20%22%22%0D%0A%0D%0AIn%20php%20you%20need%20this" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;t=Connecting%20to%20a%20database" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;h=Connecting%20to%20a%20database" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;title=Connecting%20to%20a%20database" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;title=Connecting%20to%20a%20database" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;title=Connecting%20to%20a%20database&amp;annotation=Connecting%20to%20a%20database%20through%20php%20is%20not%20a%20tough%20task.%0D%0A%0D%0AFirst%20off%20all%20create%20a%20new%20sql%20database%20in%20phpmyadmin%20and%20see%20the%20privileges%20section%20in%20it%20for%20the%20user%2Fpass%20by%20default%20it%20is%0D%0A%0D%0AUsername%20%3D%3D%20%22root%22%0D%0A%0D%0APassword%20%3D%3D%20%22%22%0D%0A%0D%0AIn%20php%20you%20need%20this" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;submitHeadline=Connecting%20to%20a%20database&amp;submitSummary=Connecting%20to%20a%20database%20through%20php%20is%20not%20a%20tough%20task.%0D%0A%0D%0AFirst%20off%20all%20create%20a%20new%20sql%20database%20in%20phpmyadmin%20and%20see%20the%20privileges%20section%20in%20it%20for%20the%20user%2Fpass%20by%20default%20it%20is%0D%0A%0D%0AUsername%20%3D%3D%20%22root%22%0D%0A%0D%0APassword%20%3D%3D%20%22%22%0D%0A%0D%0AIn%20php%20you%20need%20this&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;title=Connecting%20to%20a%20database" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;title=Connecting%20to%20a%20database&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=Connecting%20to%20a%20database%20through%20php%20is%20not%20a%20tough%20task.%0D%0A%0D%0AFirst%20off%20all%20create%20a%20new%20sql%20database%20in%20phpmyadmin%20and%20see%20the%20privileges%20section%20in%20it%20for%20the%20user%2Fpass%20by%20default%20it%20is%0D%0A%0D%0AUsername%20%3D%3D%20%22root%22%0D%0A%0D%0APassword%20%3D%3D%20%22%22%0D%0A%0D%0AIn%20php%20you%20need%20this" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F28%2Fconnecting-to-a-database%2F&amp;t=Connecting%20to%20a%20database" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/28/connecting-to-a-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using for each to loop through an array</title>
		<link>http://www.easytutorial.info/27/using-for-each-to-loop-through-an-array/</link>
		<comments>http://www.easytutorial.info/27/using-for-each-to-loop-through-an-array/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 14:27:40 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/?p=27</guid>
		<description><![CDATA[Sometimes you need to loop through an for this the for each function is used for example. $grade = array(&#8220;first_name&#8221; =&#62; &#8220;First Name&#8221;, &#8220;middle_name&#8221; =&#62; &#8220;Middle Name&#8221;, &#8220;last_name&#8221; =&#62; &#8220;Last Name&#8221;, &#8220;phone&#8221; =&#62; &#8220;Phone&#8221;); foreach($grade as $field =&#62; $gard) { echo &#8221; $gard The name of the array $field &#8220;; } ?&#62; Notice the variable [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to loop through an for this the for each function is used for example.<br />
<code><br />
</code></p>
<p>$grade = array(&#8220;first_name&#8221; =&gt; &#8220;First Name&#8221;,<br />
&#8220;middle_name&#8221; =&gt; &#8220;Middle Name&#8221;,<br />
&#8220;last_name&#8221; =&gt; &#8220;Last Name&#8221;,<br />
&#8220;phone&#8221; =&gt; &#8220;Phone&#8221;);</p>
<p>foreach($grade as $field =&gt; $gard)<br />
{<br />
echo &#8221;<br />
$gard  The name of the array $field</p>
<p>&#8220;;<br />
}<br />
?&gt;<br />
<!--adsense--></p>
<p>Notice the variable $grade arrays starting from first_name is given to $field and then the array value is given to label</p>
<p>U can use this in many forms</p>
<p>Thanks<br />
krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;title=Using%20for%20each%20to%20loop%20through%20an%20array&amp;bodytext=Sometimes%20you%20need%20to%20loop%20through%20an%20for%20this%20the%20for%20each%20function%20is%20used%20for%20example.%0D%0A%0D%0A%0D%0A%0D%0A%24grade%20%3D%20array%28%22first_name%22%20%3D%26gt%3B%20%22First%20Name%22%2C%0D%0A%22middle_name%22%20%3D%26gt%3B%20%22Middle%20Name%22%2C%0D%0A%22last_name%22%20%3D%26gt%3B%20%22Last%20Name%22%2C%0D%0A%22phone%22%20%3D%26gt%3B%20%22Phone%22%29%3B%0D%0A%0D%0Aforeach%28%24" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;title=Using%20for%20each%20to%20loop%20through%20an%20array&amp;notes=Sometimes%20you%20need%20to%20loop%20through%20an%20for%20this%20the%20for%20each%20function%20is%20used%20for%20example.%0D%0A%0D%0A%0D%0A%0D%0A%24grade%20%3D%20array%28%22first_name%22%20%3D%26gt%3B%20%22First%20Name%22%2C%0D%0A%22middle_name%22%20%3D%26gt%3B%20%22Middle%20Name%22%2C%0D%0A%22last_name%22%20%3D%26gt%3B%20%22Last%20Name%22%2C%0D%0A%22phone%22%20%3D%26gt%3B%20%22Phone%22%29%3B%0D%0A%0D%0Aforeach%28%24" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;t=Using%20for%20each%20to%20loop%20through%20an%20array" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;h=Using%20for%20each%20to%20loop%20through%20an%20array" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;title=Using%20for%20each%20to%20loop%20through%20an%20array" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;title=Using%20for%20each%20to%20loop%20through%20an%20array" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;title=Using%20for%20each%20to%20loop%20through%20an%20array&amp;annotation=Sometimes%20you%20need%20to%20loop%20through%20an%20for%20this%20the%20for%20each%20function%20is%20used%20for%20example.%0D%0A%0D%0A%0D%0A%0D%0A%24grade%20%3D%20array%28%22first_name%22%20%3D%26gt%3B%20%22First%20Name%22%2C%0D%0A%22middle_name%22%20%3D%26gt%3B%20%22Middle%20Name%22%2C%0D%0A%22last_name%22%20%3D%26gt%3B%20%22Last%20Name%22%2C%0D%0A%22phone%22%20%3D%26gt%3B%20%22Phone%22%29%3B%0D%0A%0D%0Aforeach%28%24" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;submitHeadline=Using%20for%20each%20to%20loop%20through%20an%20array&amp;submitSummary=Sometimes%20you%20need%20to%20loop%20through%20an%20for%20this%20the%20for%20each%20function%20is%20used%20for%20example.%0D%0A%0D%0A%0D%0A%0D%0A%24grade%20%3D%20array%28%22first_name%22%20%3D%26gt%3B%20%22First%20Name%22%2C%0D%0A%22middle_name%22%20%3D%26gt%3B%20%22Middle%20Name%22%2C%0D%0A%22last_name%22%20%3D%26gt%3B%20%22Last%20Name%22%2C%0D%0A%22phone%22%20%3D%26gt%3B%20%22Phone%22%29%3B%0D%0A%0D%0Aforeach%28%24&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;title=Using%20for%20each%20to%20loop%20through%20an%20array" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;title=Using%20for%20each%20to%20loop%20through%20an%20array&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=Sometimes%20you%20need%20to%20loop%20through%20an%20for%20this%20the%20for%20each%20function%20is%20used%20for%20example.%0D%0A%0D%0A%0D%0A%0D%0A%24grade%20%3D%20array%28%22first_name%22%20%3D%26gt%3B%20%22First%20Name%22%2C%0D%0A%22middle_name%22%20%3D%26gt%3B%20%22Middle%20Name%22%2C%0D%0A%22last_name%22%20%3D%26gt%3B%20%22Last%20Name%22%2C%0D%0A%22phone%22%20%3D%26gt%3B%20%22Phone%22%29%3B%0D%0A%0D%0Aforeach%28%24" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F27%2Fusing-for-each-to-loop-through-an-array%2F&amp;t=Using%20for%20each%20to%20loop%20through%20an%20array" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/27/using-for-each-to-loop-through-an-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple PHP navigation tutorial</title>
		<link>http://www.easytutorial.info/26/simple-php-navigation-tutorial/</link>
		<comments>http://www.easytutorial.info/26/simple-php-navigation-tutorial/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 14:31:23 +0000</pubDate>
		<dc:creator>bilalghouri</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/?p=26</guid>
		<description><![CDATA[Html pages are boring. Everyone is using php navigations now, for example ?id=news etc., well its not all that complicated and since you are reading this I assume you would like to learn how to do it! Note: Your server must have php installed for this to work and your extensions should end in .php. [...]]]></description>
			<content:encoded><![CDATA[<p>Html pages are boring. Everyone is using php navigations now, for example ?id=news etc., well its not all that complicated and since you are reading this I assume you would like to learn how to do it!</p>
<p><strong>Note:</strong></p>
<p>Your server must have php installed for this to work and your extensions should end in .php.</p>
<p>And on to the tutorial:</p>
<p>This is the basic code I use, you can copy it and put it on your page!</p>
<p>Note<br />
This code would go in your main content area.</p>
<p>&lt;?php<br />
switch($id) {<br />
default:<br />
include(&#8216;news.php&#8217;);<br />
break;<br />
case &#8216;about&#8217; :<br />
include(&#8216;about.html&#8217;);<br />
break;<br />
}<br />
?&gt;</p>
<p>Thats it, however i  will explain it in a bit more depth..</p>
<p>default:<br />
include(&#8216;news.php&#8217;);<br />
break;</p>
<p>This is the main page you want to open when you load your website for most people its news and updates etc. This can be php or html or whatever.</p>
<p>case &#8216;about&#8217; :<br />
include(&#8216;about.html&#8217;);<br />
break;</p>
<p>This is the page you want to include next such as an about page etc. Keep adding the pages so you got all you need. Your code will look like something below:</p>
<p><!--adsense--></p>
<p>&lt;?php<br />
switch($id) {<br />
default:<br />
include(&#8216;news.php&#8217;);<br />
break;<br />
case &#8216;about&#8217; :<br />
include(&#8216;about.html&#8217;);<br />
break;<br />
case &#8216;tutorials&#8217; :<br />
include(&#8216;tutorials.php&#8217;);<br />
break;<br />
case &#8216;downloads&#8217; :<br />
include(&#8216;downloads.html&#8217;);<br />
break;<br />
case &#8216;templates&#8217; :<br />
include(&#8216;temps.html&#8217;);<br />
break;<br />
case &#8216;comming&#8217; :<br />
include(&#8216;soon.html&#8217;);<br />
break;<br />
}<br />
?&gt;</p>
<p>Now if you are not completely lost yet this is what you do to link your pages, Change your links from &lt;a href=&#8221;about.html&#8221;&gt;About&lt;/a&gt; to &lt;a href=&#8221;?id=about&#8221;&gt;About&lt;/a&gt;</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;title=Simple%20PHP%20navigation%20tutorial&amp;bodytext=Html%20pages%20are%20boring.%20Everyone%20is%20using%20php%20navigations%20now%2C%20for%20example%20%3Fid%3Dnews%20etc.%2C%20well%20its%20not%20all%20that%20complicated%20and%20since%20you%20are%20reading%20this%20I%20assume%20you%20would%20like%20to%20learn%20how%20to%20do%20it%21%0D%0A%0D%0ANote%3A%0D%0A%0D%0AYour%20server%20must%20have%20php%20installed%20f" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;title=Simple%20PHP%20navigation%20tutorial&amp;notes=Html%20pages%20are%20boring.%20Everyone%20is%20using%20php%20navigations%20now%2C%20for%20example%20%3Fid%3Dnews%20etc.%2C%20well%20its%20not%20all%20that%20complicated%20and%20since%20you%20are%20reading%20this%20I%20assume%20you%20would%20like%20to%20learn%20how%20to%20do%20it%21%0D%0A%0D%0ANote%3A%0D%0A%0D%0AYour%20server%20must%20have%20php%20installed%20f" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;t=Simple%20PHP%20navigation%20tutorial" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;h=Simple%20PHP%20navigation%20tutorial" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;title=Simple%20PHP%20navigation%20tutorial" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;title=Simple%20PHP%20navigation%20tutorial" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;title=Simple%20PHP%20navigation%20tutorial&amp;annotation=Html%20pages%20are%20boring.%20Everyone%20is%20using%20php%20navigations%20now%2C%20for%20example%20%3Fid%3Dnews%20etc.%2C%20well%20its%20not%20all%20that%20complicated%20and%20since%20you%20are%20reading%20this%20I%20assume%20you%20would%20like%20to%20learn%20how%20to%20do%20it%21%0D%0A%0D%0ANote%3A%0D%0A%0D%0AYour%20server%20must%20have%20php%20installed%20f" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;submitHeadline=Simple%20PHP%20navigation%20tutorial&amp;submitSummary=Html%20pages%20are%20boring.%20Everyone%20is%20using%20php%20navigations%20now%2C%20for%20example%20%3Fid%3Dnews%20etc.%2C%20well%20its%20not%20all%20that%20complicated%20and%20since%20you%20are%20reading%20this%20I%20assume%20you%20would%20like%20to%20learn%20how%20to%20do%20it%21%0D%0A%0D%0ANote%3A%0D%0A%0D%0AYour%20server%20must%20have%20php%20installed%20f&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;title=Simple%20PHP%20navigation%20tutorial" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;title=Simple%20PHP%20navigation%20tutorial&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=Html%20pages%20are%20boring.%20Everyone%20is%20using%20php%20navigations%20now%2C%20for%20example%20%3Fid%3Dnews%20etc.%2C%20well%20its%20not%20all%20that%20complicated%20and%20since%20you%20are%20reading%20this%20I%20assume%20you%20would%20like%20to%20learn%20how%20to%20do%20it%21%0D%0A%0D%0ANote%3A%0D%0A%0D%0AYour%20server%20must%20have%20php%20installed%20f" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F26%2Fsimple-php-navigation-tutorial%2F&amp;t=Simple%20PHP%20navigation%20tutorial" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/26/simple-php-navigation-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending a mail from your script</title>
		<link>http://www.easytutorial.info/25/sending-a-mail-from-your-script/</link>
		<comments>http://www.easytutorial.info/25/sending-a-mail-from-your-script/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 10:52:33 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/?p=25</guid>
		<description><![CDATA[Many a times you want to send a mail to someone through your website you can easily do that by the php inbuilt function mail Syntax: mail(to,subject,message,headers,parameters); To: == The person email you are sending the mail to Subject: == The subject of the email Message: == The main email message can consist of the [...]]]></description>
			<content:encoded><![CDATA[<p>Many a times you want to send a  mail to someone through your website  you can easily do that by the php inbuilt function <strong>mail</strong></p>
<p><strong>Syntax: </strong></p>
<p>mail(to,subject,message,headers,parameters);</p>
<p>To: == The person email you are sending the mail to</p>
<p>Subject: == The subject of the email</p>
<p>Message: == The main email message can consist of  the new line character ( \n ) tab character ( \t ) etc</p>
<p>Parameters: == Optional parameters</p>
<p><strong>Creating the script to send a mail:</strong></p>
<p><!--adsense--></p>
<p>&lt;?php<br />
$to = &#8220;someone@someone.com&#8221;;</p>
<p>$subject = &#8220;Checking Mail Function&#8221;;</p>
<p>$message = &#8220;This is the body of the email.&#8221;;</p>
<p>$from = &#8220;something@something.com&#8221;;</p>
<p>$headers = &#8220;From: $from&#8221;;</p>
<p>mail($to,$subject,$message,$headers);</p>
<p>echo &#8220;Mail Sent.&#8221;;<br />
?&gt;</p>
<p>Now this script every time when it  will run it will send a mail to the email someone@someone.com</p>
<p>You can add user input to it by using if , isset functions</p>
<p><strong>Hint:</strong> isset is a function which checks that a  form field is filled or not used in db functions also</p>
<p>Thanks</p>
<p>krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;title=Sending%20a%20mail%20from%20your%20script&amp;bodytext=Many%20a%20times%20you%20want%20to%20send%20a%20%20mail%20to%20someone%20through%20your%20website%20%20you%20can%20easily%20do%20that%20by%20the%20php%20inbuilt%20function%20mail%0D%0A%0D%0ASyntax%3A%20%0D%0A%0D%0Amail%28to%2Csubject%2Cmessage%2Cheaders%2Cparameters%29%3B%0D%0A%0D%0ATo%3A%20%3D%3D%20The%20person%20email%20you%20are%20sending%20the%20mail%20to%0D%0A%0D%0ASubje" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;title=Sending%20a%20mail%20from%20your%20script&amp;notes=Many%20a%20times%20you%20want%20to%20send%20a%20%20mail%20to%20someone%20through%20your%20website%20%20you%20can%20easily%20do%20that%20by%20the%20php%20inbuilt%20function%20mail%0D%0A%0D%0ASyntax%3A%20%0D%0A%0D%0Amail%28to%2Csubject%2Cmessage%2Cheaders%2Cparameters%29%3B%0D%0A%0D%0ATo%3A%20%3D%3D%20The%20person%20email%20you%20are%20sending%20the%20mail%20to%0D%0A%0D%0ASubje" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;t=Sending%20a%20mail%20from%20your%20script" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;h=Sending%20a%20mail%20from%20your%20script" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;title=Sending%20a%20mail%20from%20your%20script" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;title=Sending%20a%20mail%20from%20your%20script" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;title=Sending%20a%20mail%20from%20your%20script&amp;annotation=Many%20a%20times%20you%20want%20to%20send%20a%20%20mail%20to%20someone%20through%20your%20website%20%20you%20can%20easily%20do%20that%20by%20the%20php%20inbuilt%20function%20mail%0D%0A%0D%0ASyntax%3A%20%0D%0A%0D%0Amail%28to%2Csubject%2Cmessage%2Cheaders%2Cparameters%29%3B%0D%0A%0D%0ATo%3A%20%3D%3D%20The%20person%20email%20you%20are%20sending%20the%20mail%20to%0D%0A%0D%0ASubje" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;submitHeadline=Sending%20a%20mail%20from%20your%20script&amp;submitSummary=Many%20a%20times%20you%20want%20to%20send%20a%20%20mail%20to%20someone%20through%20your%20website%20%20you%20can%20easily%20do%20that%20by%20the%20php%20inbuilt%20function%20mail%0D%0A%0D%0ASyntax%3A%20%0D%0A%0D%0Amail%28to%2Csubject%2Cmessage%2Cheaders%2Cparameters%29%3B%0D%0A%0D%0ATo%3A%20%3D%3D%20The%20person%20email%20you%20are%20sending%20the%20mail%20to%0D%0A%0D%0ASubje&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;title=Sending%20a%20mail%20from%20your%20script" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;title=Sending%20a%20mail%20from%20your%20script&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=Many%20a%20times%20you%20want%20to%20send%20a%20%20mail%20to%20someone%20through%20your%20website%20%20you%20can%20easily%20do%20that%20by%20the%20php%20inbuilt%20function%20mail%0D%0A%0D%0ASyntax%3A%20%0D%0A%0D%0Amail%28to%2Csubject%2Cmessage%2Cheaders%2Cparameters%29%3B%0D%0A%0D%0ATo%3A%20%3D%3D%20The%20person%20email%20you%20are%20sending%20the%20mail%20to%0D%0A%0D%0ASubje" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F25%2Fsending-a-mail-from-your-script%2F&amp;t=Sending%20a%20mail%20from%20your%20script" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/25/sending-a-mail-from-your-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File upload in php</title>
		<link>http://www.easytutorial.info/16/file-upload-in-php/</link>
		<comments>http://www.easytutorial.info/16/file-upload-in-php/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 07:21:54 +0000</pubDate>
		<dc:creator>krates</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.easytutorial.info/?p=16</guid>
		<description><![CDATA[If you want users to upload files you can do this by using php HTML FILE &#60;form action=&#8221;upload.php&#8221; method=&#8221;post&#8221; enctype=&#8221;multipart/form-data&#8221;&#62; &#60;input type=&#8221;file&#8221; name=&#8221;upload&#8221; /&#62; &#60;br /&#62; &#60;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;Submit&#8221; /&#62; &#60;/form&#62; The file of yours will now consist of a browse button through which a user can select the file he wants to upload [...]]]></description>
			<content:encoded><![CDATA[<p>If you want users to upload files you can do this by using php</p>
<p>HTML FILE</p>
<h6>&lt;form action=&#8221;upload.php&#8221; method=&#8221;post&#8221;<br />
enctype=&#8221;multipart/form-data&#8221;&gt;<br />
&lt;input type=&#8221;file&#8221; name=&#8221;upload&#8221; /&gt;<br />
&lt;br /&gt;<br />
&lt;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;Submit&#8221; /&gt;<br />
&lt;/form&gt;</h6>
<p>The file of yours will now consist of a browse button through which a user can select the file he wants to upload</p>
<p><!--adsense--></p>
<p>The upload.php will display the file information and upload the file to the folder upload</p>
<p>UPLOAD.PHP</p>
<h6>&lt;?php</h6>
<h6> if(isset($_FILES['upload'])){if ($_FILES["file"]["error"] &gt; 0)<br />
{<br />
echo &#8220;Contain error &#8221; . $_FILES["file"]["error"] . &#8220;&lt;br /&gt;&#8221;;<br />
}<br />
else<br />
{</h6>
<h6>echo &#8220;File name &#8221; . $_FILES["file"]["name"] . &#8220;&lt;br /&gt;&#8221;;<br />
echo &#8220;File Type: &#8221; . $_FILES["file"]["type"] . &#8220;&lt;br /&gt;&#8221;;<br />
echo &#8220;File size: &#8221; . ($_FILES["file"]["size"] / 1024) . &#8221; Kb&lt;br /&gt;&#8221;;<br />
echo &#8220;Temp file: &#8221; . $_FILES["file"]["tmp_name"] . &#8220;&lt;br /&gt;&#8221;;if (file_exists(&#8220;upload/&#8221; . $_FILES["file"]["name"]))<br />
{<br />
echo $_FILES["file"]["name"] . &#8221; already exists. &#8220;;<br />
}<br />
else<br />
{<br />
move_uploaded_file($_FILES["file"]["tmp_name"],<br />
&#8220;upload/&#8221; . $_FILES["file"]["name"]);<br />
echo &#8220;Stored in: &#8221; . &#8220;upload/&#8221; . $_FILES["file"]["name"];<br />
}<br />
}<br />
}<br />
else{<br />
echo &#8216;where have you come from ha&#8217;;<br />
}?&gt;</h6>
<pre></pre>
<p>Create both the files and upload to the server then create a folder named <em><strong>upload [important]   </strong></em>Or else you will get error.</p>
<p>When done check</p>
<p>Thanks<br />
krates</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;title=File%20upload%20in%20php&amp;bodytext=If%20you%20want%20users%20to%20upload%20files%20you%20can%20do%20this%20by%20using%20php%0D%0A%0D%0AHTML%20FILE%0D%0A%26lt%3Bform%20action%3D%22upload.php%22%20method%3D%22post%22%0D%0Aenctype%3D%22multipart%2Fform-data%22%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22file%22%20name%3D%22upload%22%20%2F%26gt%3B%0D%0A%26lt%3Bbr%20%2F%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22submit%22%20name%3D%22submit%22" title="Digg"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;title=File%20upload%20in%20php&amp;notes=If%20you%20want%20users%20to%20upload%20files%20you%20can%20do%20this%20by%20using%20php%0D%0A%0D%0AHTML%20FILE%0D%0A%26lt%3Bform%20action%3D%22upload.php%22%20method%3D%22post%22%0D%0Aenctype%3D%22multipart%2Fform-data%22%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22file%22%20name%3D%22upload%22%20%2F%26gt%3B%0D%0A%26lt%3Bbr%20%2F%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22submit%22%20name%3D%22submit%22" title="del.icio.us"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;t=File%20upload%20in%20php" title="Facebook"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;h=File%20upload%20in%20php" title="NewsVine"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;title=File%20upload%20in%20php" title="Reddit"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;title=File%20upload%20in%20php" title="StumbleUpon"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;title=File%20upload%20in%20php&amp;annotation=If%20you%20want%20users%20to%20upload%20files%20you%20can%20do%20this%20by%20using%20php%0D%0A%0D%0AHTML%20FILE%0D%0A%26lt%3Bform%20action%3D%22upload.php%22%20method%3D%22post%22%0D%0Aenctype%3D%22multipart%2Fform-data%22%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22file%22%20name%3D%22upload%22%20%2F%26gt%3B%0D%0A%26lt%3Bbr%20%2F%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22submit%22%20name%3D%22submit%22" title="Google Bookmarks"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;submitHeadline=File%20upload%20in%20php&amp;submitSummary=If%20you%20want%20users%20to%20upload%20files%20you%20can%20do%20this%20by%20using%20php%0D%0A%0D%0AHTML%20FILE%0D%0A%26lt%3Bform%20action%3D%22upload.php%22%20method%3D%22post%22%0D%0Aenctype%3D%22multipart%2Fform-data%22%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22file%22%20name%3D%22upload%22%20%2F%26gt%3B%0D%0A%26lt%3Bbr%20%2F%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22submit%22%20name%3D%22submit%22&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;title=File%20upload%20in%20php" title="Live"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;title=File%20upload%20in%20php&amp;source=Easy+Tutorials+Web+Design+Tutorial+Blog&amp;summary=If%20you%20want%20users%20to%20upload%20files%20you%20can%20do%20this%20by%20using%20php%0D%0A%0D%0AHTML%20FILE%0D%0A%26lt%3Bform%20action%3D%22upload.php%22%20method%3D%22post%22%0D%0Aenctype%3D%22multipart%2Fform-data%22%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22file%22%20name%3D%22upload%22%20%2F%26gt%3B%0D%0A%26lt%3Bbr%20%2F%26gt%3B%0D%0A%26lt%3Binput%20type%3D%22submit%22%20name%3D%22submit%22" title="LinkedIn"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Pownce"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.easytutorial.info%2F16%2Ffile-upload-in-php%2F&amp;t=File%20upload%20in%20php" title="MySpace"><img src="http://www.easytutorial.info/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.easytutorial.info/16/file-upload-in-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
