<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: SQL Injection Attack &#8211; Examples and Preventions in PHP</title>
	<atom:link href="http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/feed" rel="self" type="application/rss+xml" />
	<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html</link>
	<description>Useful Tutorials, Scripts , Tips, and Resources for all PHP and Ajax beginners and experts .</description>
	<lastBuildDate>Sun, 14 Mar 2010 01:15:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Picas</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-4397</link>
		<dc:creator>Picas</dc:creator>
		<pubDate>Tue, 18 Aug 2009 17:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-4397</guid>
		<description>Can we do sql Injection if the developer use session before we login..??</description>
		<content:encoded><![CDATA[<p>Can we do sql Injection if the developer use session before we login..??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL Injection Attack Examples and Preventions in PHP &#124; Green Tea Fat Burner</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-4068</link>
		<dc:creator>SQL Injection Attack Examples and Preventions in PHP &#124; Green Tea Fat Burner</dc:creator>
		<pubDate>Mon, 08 Jun 2009 01:59:11 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-4068</guid>
		<description>[...] SQL Injection Attack Examples and Preventions in PHP   Posted by root 3 hours ago (http://roshanbh.com.np)        Sql injection attack example and preventions or prevention in php fat hobbit wrote on 26 december 2007 13 31 an easy method of preventing sql injection with php and mysql write a comment name required mail required website powered by wordpress org custom        Discuss&#160;  &#124;&#160; Bury &#124;&#160;    News &#124; SQL Injection Attack Examples and Preventions in PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] SQL Injection Attack Examples and Preventions in PHP   Posted by root 3 hours ago (<a href="http://roshanbh.com.np" rel="nofollow">http://roshanbh.com.np</a>)        Sql injection attack example and preventions or prevention in php fat hobbit wrote on 26 december 2007 13 31 an easy method of preventing sql injection with php and mysql write a comment name required mail required website powered by wordpress org custom        Discuss&nbsp;  |&nbsp; Bury |&nbsp;    News | SQL Injection Attack Examples and Preventions in PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 7 Useful functions to tighten the security in PHP &#171; HMV.co.in</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-2644</link>
		<dc:creator>7 Useful functions to tighten the security in PHP &#171; HMV.co.in</dc:creator>
		<pubDate>Fri, 03 Oct 2008 21:11:38 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-2644</guid>
		<description>[...] are few useful functions which is very handy for preventing your website from various attacks like SQL Injection Attack , XSS attack etc.Let’s check few useful functions available in PHP to tighten the security in [...]</description>
		<content:encoded><![CDATA[<p>[...] are few useful functions which is very handy for preventing your website from various attacks like SQL Injection Attack , XSS attack etc.Let’s check few useful functions available in PHP to tighten the security in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gk</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-2067</link>
		<dc:creator>Gk</dc:creator>
		<pubDate>Fri, 29 Aug 2008 10:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-2067</guid>
		<description>However, I can use some of the programs to create a packet w/o any limit of data be posted. And trust me, it&#039;s very easy. So check on the server side is only method to defense a SQL injection attack.</description>
		<content:encoded><![CDATA[<p>However, I can use some of the programs to create a packet w/o any limit of data be posted. And trust me, it&#8217;s very easy. So check on the server side is only method to defense a SQL injection attack.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roshan</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-1878</link>
		<dc:creator>Roshan</dc:creator>
		<pubDate>Thu, 14 Aug 2008 17:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-1878</guid>
		<description>@Animesh - Ya you&#039;re a attacker can post the data from other domain as well but you can also restrict the cross domain request forgery</description>
		<content:encoded><![CDATA[<p>@Animesh &#8211; Ya you&#8217;re a attacker can post the data from other domain as well but you can also restrict the cross domain request forgery</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Animesh</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-1876</link>
		<dc:creator>Animesh</dc:creator>
		<pubDate>Thu, 14 Aug 2008 14:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-1876</guid>
		<description>Hi,
Good article.

I am not sure if point #1 [ restricting the length of the fields of the html form ] is of much use, since a user can always create a query without using the form we create. I feel that server side checks are the only sure way to go, and assuming that html form based security will save us might lull some developers into a false sense of security.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Good article.</p>
<p>I am not sure if point #1 [ restricting the length of the fields of the html form ] is of much use, since a user can always create a query without using the form we create. I feel that server side checks are the only sure way to go, and assuming that html form based security will save us might lull some developers into a false sense of security.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Butler</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-1240</link>
		<dc:creator>Mark Butler</dc:creator>
		<pubDate>Fri, 20 Jun 2008 12:47:54 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-1240</guid>
		<description>We should also mention that some of the most destructive exploits can be avoided by designing applications so that the user does not have access to DDL statements like DROP, ALTER, or CREATE.</description>
		<content:encoded><![CDATA[<p>We should also mention that some of the most destructive exploits can be avoided by designing applications so that the user does not have access to DDL statements like DROP, ALTER, or CREATE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Useful functions to tighten the PHP security</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-975</link>
		<dc:creator>Useful functions to tighten the PHP security</dc:creator>
		<pubDate>Sat, 24 May 2008 18:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-975</guid>
		<description>[...] are few useful functions which is very handy for preventing your website from various attacks like SQL Injection Attack , XSS attack etc.Let&#8217;s check few useful functions available in PHP to tighten the security in [...]</description>
		<content:encoded><![CDATA[<p>[...] are few useful functions which is very handy for preventing your website from various attacks like SQL Injection Attack , XSS attack etc.Let&#8217;s check few useful functions available in PHP to tighten the security in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Change dropdown list (options) values from database with ajax and php</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-446</link>
		<dc:creator>Change dropdown list (options) values from database with ajax and php</dc:creator>
		<pubDate>Sun, 09 Mar 2008 06:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-446</guid>
		<description>[...] instead of $country=$_GET[&#8217;country&#8217;];  in the findcity.php to prevent your site from sql injection attack. The cisco certification gives great importance to the networking administrators so that they may [...]</description>
		<content:encoded><![CDATA[<p>[...] instead of $country=$_GET[&#8217;country&#8217;];  in the findcity.php to prevent your site from sql injection attack. The cisco certification gives great importance to the networking administrators so that they may [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: will</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-78</link>
		<dc:creator>will</dc:creator>
		<pubDate>Tue, 15 Jan 2008 14:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-78</guid>
		<description>In response to Hobbit: 
Prepared statements are ideal, however, only MySQL 5 and newer support them. Most LAMP environments are pre-packaged with MySQL 3.23 or 4.1, leaving much to be desired for site developers.



mysql_real_escape_string is handy, but requires you to connect to the database to clean your input.
as a result, you waste a database connection until it is actually needed. 

Jay Pipes of MySQL (www.jaypipes.com) has a handy SQLConnection class which utilizes lazy loading to aid this interaction.

in a perfect environment, mysql_real_escape_string would be ideal because it takes into account the connection&#039;s character set. in medium to large scale environments, it can be a curse because it lengthens the amount of time a connection needs to stay open with MySQL until the query is built and run. Many people choose to use php&#039;s addslashes() in leui of this function.</description>
		<content:encoded><![CDATA[<p>In response to Hobbit:<br />
Prepared statements are ideal, however, only MySQL 5 and newer support them. Most LAMP environments are pre-packaged with MySQL 3.23 or 4.1, leaving much to be desired for site developers.</p>
<p>mysql_real_escape_string is handy, but requires you to connect to the database to clean your input.<br />
as a result, you waste a database connection until it is actually needed. </p>
<p>Jay Pipes of MySQL (www.jaypipes.com) has a handy SQLConnection class which utilizes lazy loading to aid this interaction.</p>
<p>in a perfect environment, mysql_real_escape_string would be ideal because it takes into account the connection&#8217;s character set. in medium to large scale environments, it can be a curse because it lengthens the amount of time a connection needs to stay open with MySQL until the query is built and run. Many people choose to use php&#8217;s addslashes() in leui of this function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wscoop</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-71</link>
		<dc:creator>wscoop</dc:creator>
		<pubDate>Mon, 14 Jan 2008 04:57:43 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-71</guid>
		<description>&lt;strong&gt;Story added...&lt;/strong&gt;

Your story was featured in wscoop! Post: http://www.wscoop.com/Build/SQL-Injection-Attack-Examples-and-Preventions-in-PHP...</description>
		<content:encoded><![CDATA[<p><strong>Story added&#8230;</strong></p>
<p>Your story was featured in wscoop! Post: <a href="http://www.wscoop.com/Build/SQL-Injection-Attack-Examples-and-Preventions-in-PHP.." rel="nofollow">http://www.wscoop.com/Build/SQL-Injection-Attack-Examples-and-Preventions-in-PHP..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim O</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-27</link>
		<dc:creator>Jim O</dc:creator>
		<pubDate>Thu, 27 Dec 2007 00:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-27</guid>
		<description>It&#039;s worth noting that the mysql_query function in PHP doesn&#039;t support/allow multiple statements, so your DROP TABLE example wouldn&#039;t work anyway.  &lt;br/&gt;&lt;br/&gt;As a previous commenter said, prepared statements are a good way to avoid SQL injection, so much so that prepared statements are the only database feature that PDO will emulate if the database doesn&#039;t support them natively.  PDO, ADOdb, and CpdeIgniter&#039;s database libraries all support prepared statement style syntax, and I find it a very convenient way to deal with SQL Injection.&lt;br/&gt;&lt;br/&gt;Jim.</description>
		<content:encoded><![CDATA[<p>It&#8217;s worth noting that the mysql_query function in PHP doesn&#8217;t support/allow multiple statements, so your DROP TABLE example wouldn&#8217;t work anyway.  </p>
<p>As a previous commenter said, prepared statements are a good way to avoid SQL injection, so much so that prepared statements are the only database feature that PDO will emulate if the database doesn&#8217;t support them natively.  PDO, ADOdb, and CpdeIgniter&#8217;s database libraries all support prepared statement style syntax, and I find it a very convenient way to deal with SQL Injection.</p>
<p>Jim.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fat Hobbit</title>
		<link>http://roshanbh.com.np/2007/12/sql-injection-attack-examples-and-preventions-in-php.html/comment-page-1#comment-26</link>
		<dc:creator>Fat Hobbit</dc:creator>
		<pubDate>Wed, 26 Dec 2007 13:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/sql-injection-attack-examples-and-preventions-in-php/#comment-26</guid>
		<description>An easy method of preventing sql injection with php and mysql (or any database) is using &lt;a HREF=&quot;http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html&quot; REL=&quot;nofollow&quot;&gt;prepared statements&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This is also true for oracle or other databases.&lt;br/&gt;I like using this technique, since i lets the database do what it&#039;s good at, while i can focus on the task at hand.</description>
		<content:encoded><![CDATA[<p>An easy method of preventing sql injection with php and mysql (or any database) is using <a HREF="http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html" REL="nofollow">prepared statements</a></p>
<p>This is also true for oracle or other databases.<br />I like using this technique, since i lets the database do what it&#8217;s good at, while i can focus on the task at hand.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
