<?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>PHP Programming Tips</title>
	<atom:link href="http://phpprogrammingtips.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpprogrammingtips.com</link>
	<description></description>
	<lastBuildDate>Wed, 10 Feb 2010 12:13:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating Your Own &#8220;Function&#8221;</title>
		<link>http://phpprogrammingtips.com/php/creating-your-own-function/</link>
		<comments>http://phpprogrammingtips.com/php/creating-your-own-function/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 12:13:41 +0000</pubDate>
		<dc:creator>Celine</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/php/creating-your-own-function/</guid>
		<description><![CDATA[
A function is a block of code that can be executed whenever we need it.
Creating PHP functions:
* All functions start with the word &#8220;function()&#8221;
* Name the function &#8211; It should be possible to understand what the function does by its name. The name can start with a letter or underscore (not a number)
* Add a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oreilly.com/catalog/9780596008796/toc.html"><img src="/wp-content/uploads/scraped/9.jpg"/></a>
<p>A function is a block of code that can be executed whenever we need it.</p>
<p>Creating PHP functions:</p>
<p>* All functions start with the word &#8220;function()&#8221;<br />
* Name the function &#8211; It should be possible to understand what the function does by its name. The name can start with a letter or underscore (not a number)<br />
* Add a &#8220;{&#8221;  &#8211; The function code starts after the opening curly brace<br />
* Insert the function code<br />
* Add a &#8220;}&#8221;  &#8211; The function is finished by a closing curly brace</p>
<p>Example</p>
<p>A simple function that writes my name when it is called:</p>
<blockquote><p>&lt;html&gt;<br />
&lt;body&gt;</p>
<p>&lt;?php<br />
function writeMyName()<br />
{<br />
echo &#8220;Michelle&#8221;;<br />
}</p>
<p>writeMyName();<br />
?&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>Use a PHP Function</p>
<p>Now we will use the function in a PHP script:</p>
<blockquote><p>&lt;html&gt;<br />
&lt;body&gt;</p>
<p>&lt;?php<br />
function writeMyName()<br />
{<br />
echo &#8220;Michelle&#8221;;<br />
}</p>
<p>echo &#8220;Hello world!&lt;br /&gt;&#8221;;<br />
echo &#8220;My name is &#8220;;<br />
writeMyName();<br />
echo &#8220;.&lt;br /&gt;That&#8217;s right, &#8220;;<br />
writeMyName();<br />
echo &#8221; is my name.&#8221;;<br />
?&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>The output of the code above will be:</p>
<blockquote><p><strong>Hello world!</strong><br />
<strong>My name is Michelle.</strong><br />
<strong>That&#8217;s right, Michelle is my name.</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/php/creating-your-own-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP + MySQL</title>
		<link>http://phpprogrammingtips.com/php/php-mysql/</link>
		<comments>http://phpprogrammingtips.com/php/php-mysql/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 23:49:19 +0000</pubDate>
		<dc:creator>Celine</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/php/php-mysql/</guid>
		<description><![CDATA[
PHP stands for PHP: Hypertext Preprocessor. It is a server-side scripting language wherein the scripts are executed on the server itself. PHP is an open source software and is free to download and use. MySQL is a database server that is ideal for both small and large applications. MySQL can compile on a number of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://theflashblog.com/%3Fp%3D48"><img src="/wp-content/uploads/scraped/15.jpg"/></a>
<p>PHP stands for PHP: Hypertext Preprocessor. It is a server-side scripting language wherein the scripts are executed on the server itself. PHP is an open source software and is free to download and use. MySQL is a database server that is ideal for both small and large applications. MySQL can compile on a number of platforms and just like PHP, it is free to download and use. Both are open to everybody who wants to learn more on this.</p>
<p>PHP combined with MySQL can create a  cross-platform which means that you can freely develop in Windows and serve on a Unix platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/php/php-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User Validation</title>
		<link>http://phpprogrammingtips.com/php/user-validation/</link>
		<comments>http://phpprogrammingtips.com/php/user-validation/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 07:53:01 +0000</pubDate>
		<dc:creator>Celine</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/uncategorized/user-validation/</guid>
		<description><![CDATA[

The golden rule on the world wide web is that one should &#8220;never-ever-ever trust user input&#8221;. Given this, it would be wise to spend quite some time to make sure that all of the inputs from the users in able to make sure it is safe and what was expected..
There are several things to should [...]]]></description>
			<content:encoded><![CDATA[<p><em></em></p>
<p><img src="http://imagine.gsfc.nasa.gov/Images/bios/stecker/computer.jpg" alt="" /></p>
<p>The golden rule on the world wide web is that one should &#8220;never-ever-ever trust user input&#8221;. Given this, it would be wise to spend quite some time to make sure that all of the inputs from the users in able to make sure it is safe and what was expected..</p>
<p>There are several things to should watch out for when validating input:</p>
<p><strong>Mistaken input</strong>.<br />
For example the user types 99.7 rather than  9.97<br />
<strong>Bad input </strong><br />
The user provides incorrect input in on purpose for whatever reason.<br />
<strong>Dangerous input</strong><br />
User innocently enters information that would harm the system<br />
<strong>Missing input </strong><br />
User provides no input.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/php/user-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is the Best PHP Program for Use?</title>
		<link>http://phpprogrammingtips.com/basic-programming/what-is-the-best-php-program-for-use/</link>
		<comments>http://phpprogrammingtips.com/basic-programming/what-is-the-best-php-program-for-use/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 08:51:52 +0000</pubDate>
		<dc:creator>Celine</dc:creator>
				<category><![CDATA[Basic Programming]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/uncategorized/what-is-the-best-php-program-for-use/</guid>
		<description><![CDATA[
PHP can be done through a lot of programming languages. This can be from the simple notepad authoring (a practice that can be done by advanced programmers who are already familiar with PHP programming) or from PHP ready programs such as Dreamweaver.
It would be best however to read on more on which software can be [...]]]></description>
			<content:encoded><![CDATA[<p><center><a href='http://media.woolie.co.uk/images/blogs/php/phpBusinessGuru_small.jpg' title='Best Php Software'><img src='http://phpprogramming101.com/wp-content/uploads/2008/03/phpbusinessguru_small.jpg' width=200 alt='Best Php Software' /></a></center><br />
PHP can be done through a lot of programming languages. This can be from the simple notepad authoring (a practice that can be done by advanced programmers who are already familiar with PHP programming) or from PHP ready programs such as Dreamweaver.</p>
<p>It would be best however to read on more on which software can be suitable for you. PHP is a common scripting technique these days and some even download basic scripts and enhance them afterwards. This approach is actually a learning process and in the end, you will find yourself starting from scratch and making your own scripts for self-improvement in the world of website design and development.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/basic-programming/what-is-the-best-php-program-for-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP vs PHP: Security</title>
		<link>http://phpprogrammingtips.com/php/asp-vs-php-why-is-php-better-44/</link>
		<comments>http://phpprogrammingtips.com/php/asp-vs-php-why-is-php-better-44/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 06:54:26 +0000</pubDate>
		<dc:creator>Celine</dc:creator>
				<category><![CDATA[Comparisons]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/php/asp-vs-php-why-is-php-better-44/</guid>
		<description><![CDATA[
In PHP, common tasks like ftp, encrypt passwords in MD5, or send email from a web page all are built in hidden code, and as PHP is Open source there is a lot
of free code available for PHP.
Unlike PHP there is no hidden code with ASP. If you need to upload files, then you would [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.blacknight.com/images/security-padlock.jpg" alt="" /></p>
<p>In PHP, common tasks like ftp, encrypt passwords in MD5, or send email from a web page all are built in hidden code, and as PHP is Open source there is a lot<br />
of free code available for PHP.</p>
<p>Unlike PHP there is no hidden code with ASP. If you need to upload files, then you would need a third party component like ASP upload, also if you need to send mail you need another component and so on.</p>
<p>Although PHP is better in many aspects, ASP offers more security than PHP. </p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/php/asp-vs-php-why-is-php-better-44/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP vs PHP: Price and Versatility</title>
		<link>http://phpprogrammingtips.com/php/asp-vs-php-why-is-php-better-34/</link>
		<comments>http://phpprogrammingtips.com/php/asp-vs-php-why-is-php-better-34/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 06:51:31 +0000</pubDate>
		<dc:creator>Celine</dc:creator>
				<category><![CDATA[Comparisons]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/php/asp-vs-php-why-is-php-better-34/</guid>
		<description><![CDATA[
Price Compared to ASP, PHP installations are absolutely cheaper to install. PHP perfectly runs  on Linux  (which is a free OS) and programmers use MySQL .(which also comes FREE) ASP runs on the IIS Server (Internet Information Server) which requires Windows N.T/2000/2003 Servers or better. Aside from that ASP mostly uses MS-SQL Server [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://homeexchangetravel.blogs.com/photos/uncategorized/1661481_1.jpg" /></p>
<p><strong>Price </strong>Compared to ASP, PHP installations are absolutely cheaper to install. PHP perfectly runs  on Linux  (which is a free OS) and programmers use MySQL .(which also comes FREE) ASP runs on the IIS Server (Internet Information Server) which requires Windows N.T/2000/2003 Servers or better. Aside from that ASP mostly uses MS-SQL Server as the back end which is really expensive. PHP obviously is cheaper than ASP.</p>
<p><strong>Cross Platform compatibility </strong><br />
PHP programs run on a wide variety of Operating Systems Unix, Linux, Solaris and Window&#8217;s.ASP on the other hand only works flawlessly with Windows and not with other platforms. PHP offers more versatility than ASP.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/php/asp-vs-php-why-is-php-better-34/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Use Old Code with New Versions of PHP</title>
		<link>http://phpprogrammingtips.com/codes/how-to-use-old-code-with-new-versions-of-php/</link>
		<comments>http://phpprogrammingtips.com/codes/how-to-use-old-code-with-new-versions-of-php/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 11:11:04 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Codes]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/codes/how-to-use-old-code-with-new-versions-of-php/</guid>
		<description><![CDATA[
PHP developers try to maintain backwards compatibility in PHP programming such that a script written for an older version will still run without changes in a newer version. Two of the most important recent changes that affect old code are: 
• The deprecation of the old $HTTP_*_VARS arrays which should be indicated as global when [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://phpprogrammingtips.com/wp-content/uploads/2008/06/as_code.gif' alt='as_code.gif' /></p>
<p>PHP developers try to maintain backwards compatibility in PHP programming such that a script written for an older version will still run without changes in a newer version. Two of the most important recent changes that affect old code are: </p>
<p>• The deprecation of the old $HTTP_*_VARS arrays which should be indicated as global when used inside a function or method. The following <a href="http://au.php.net/manual/en/language.variables.superglobals.php">superglobal arrays</a> were introduced in PHP <a href="http://www.php.net/releases/4_1_0.php">» 4.1.0</a>. They are: a) $_GET; b) $_POST; c) $_COOKIE; d) $_SERVER; e) $_FILES; f) $_ENV; g) $_REQUEST, and; h) $_SESSION. The older $HTTP_*_VARS arrays like $HTTP_POST_VARS are also available. In PHP 5.0.0, the long PHP <a href="http://au.php.net/manual/en/language.variables.predefined.php">predefined variable</a> arrays may be disabled with the <a href="http://au.php.net/manual/en/ini.core.php#ini.register-long-arrays">register_long_arrays</a> directive. </p>
<p>• By default, external variables are no longer registered in the global scope, meaning in PHP <a href="http://www.php.net/releases/4_2_0.php">» 4.2.0</a> the PHP directive <a href="http://au.php.net/manual/en/ini.core.php#ini.register-globals">register_globals </a>is off by default in php.ini. These values can be accessed through the superglobal arrays.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/codes/how-to-use-old-code-with-new-versions-of-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Steps in Creating a Simple User Log</title>
		<link>http://phpprogrammingtips.com/basic-programming/steps-in-creating-a-simple-user-log/</link>
		<comments>http://phpprogrammingtips.com/basic-programming/steps-in-creating-a-simple-user-log/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 11:47:48 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Basic Programming]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/basic-programming/steps-in-creating-a-simple-user-log/</guid>
		<description><![CDATA[
If you want to keep track of who has been visiting your web site and their destination, it would be a good idea for you to create a simple user log. The user log that will be used here will be stored in on a flat file and will store four basic functions: a) Time [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://phpprogrammingtips.com/wp-content/uploads/2008/06/user_logtime1.gif' alt='user_logtime1.gif' /></p>
<p>If you want to keep track of who has been visiting your web site and their destination, it would be a good idea for you to create a simple user log. The user log that will be used here will be stored in on a flat file and will store four basic functions: a) Time when the user accessed your page; b) User’s IP address; c) If available, the user’s referrer, and; d) User’s browser. Make a log.html and CHMOD it to 777, giving all permissions to the file. Use the date () function to set time. The four basic functions are built into PHP (all you need to do is to define the functions and send them to a log HTML file) so all other variables are already predefined. Using fopen (), the second part of the script will open up log.html and write the data in using fputs (). </p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/basic-programming/steps-in-creating-a-simple-user-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smarty &#8211; the right stuff?</title>
		<link>http://phpprogrammingtips.com/information/smarty-the-right-stuff/</link>
		<comments>http://phpprogrammingtips.com/information/smarty-the-right-stuff/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 10:05:47 +0000</pubDate>
		<dc:creator>Celine</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/?p=160</guid>
		<description><![CDATA[Smarty is categorized as a &#8220;Template engine&#8221;, though developers describe it more detailed as a &#8220;Template/Presentation Framework&#8221;, that offers developers and programmers ample tools to make extensive coding tasks easier by replacing tags with their appropriate counterparts. Smarty is aimed to hasten and make the development process simpler for all who aim to develop pages [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://tbn3.google.com/images?q=tbn:g3LrtT1b_PKobM:http://www.ninjanuts.co.uk/images/portfolio/chinanow/screen2.jpg" alt="" />Smarty is categorized as a &#8220;Template engine&#8221;, though developers describe it more detailed as a &#8220;Template/Presentation Framework&#8221;, that offers developers and programmers ample tools to make extensive coding tasks easier by replacing tags with their appropriate counterparts. Smarty is aimed to hasten and make the development process simpler for all who aim to develop pages for the internet. <span id="more-160"></span><br />
Features include, caching that is deemed as fine-grained that determines which parts of the page have to be cached and which can be left alone. It makes for easier page management, dividing them into logical units for better management. Configuration files are also assigned values fast, so you get less code that must be shared across several pages, saving them and automatically incorporating them in other forms. May other features are available with the Smarty system so get down to testing and let your coding life get easier and better lessening the strain of development and deployment.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/information/smarty-the-right-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-Site Scripting Tips</title>
		<link>http://phpprogrammingtips.com/information/cross-site-scripting-tips/</link>
		<comments>http://phpprogrammingtips.com/information/cross-site-scripting-tips/#comments</comments>
		<pubDate>Fri, 22 May 2009 10:02:29 +0000</pubDate>
		<dc:creator>Celine</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpprogrammingtips.com/?p=158</guid>
		<description><![CDATA[There are several platforms on which web pages are deployed and with thousands of people using different versions of software, scripting languages should be endowed with the proper set of tools that determines the proper set of scripts. Scripts for one platform may differ in form in another so a conversion method should be deployed [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://tbn2.google.com/images?q=tbn:Uu-yUDtd1pUMdM:http://www.falle-internet.de/de/graphics/gif/pr_exfe1_org.gif" alt="" />There are several platforms on which web pages are deployed and with thousands of people using different versions of software, <a href="http://phpprogrammingtips.net/">scripting languages</a> should be endowed with the proper set of tools that determines the proper set of scripts. Scripts for one platform may differ in form in another so a conversion method should be deployed to allow them to properly interface with each other. Though done behind the scenes, it is of utmost importance making the web experience more enjoyable with an example of the script below for reference.<span id="more-158"></span></p>
<p>	<?php<br />
	PHP includes 3 functions that are built-in to help you with your cross-scripting tasks<br />
	- htmlspecialchars(str)<br />
	-htmlentities(str)<br />
	- strip_tags(str, allowed)<br />
	?><br />
The afore mentioned strings helps minimize the extensive need for code that would otherwise cause quite some hairfall, sent in by developers and users themselves who want to aid their fellow developers. The string &#8220;htmlspecialchars&#8221;, converts an entire string for passing onto HTML to convert brackets and other characters to recognized equivalents. The next one, &#8220;htmlentities&#8221; on the other hand, takes special characters that it finds and returns the equivalent escape values for it. The last, &#8220;strip-tags&#8221;, will strip any HTML tags that it encounters, ignoring the ones mentioned/enumerated in the allowed part of the string. These, strings also help a lot with preventing CSX attack that is one of the main security flaws that makes web pages prone to attack.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpprogrammingtips.com/information/cross-site-scripting-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
