<?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: Writing Secure SQL Queries</title>
	<atom:link href="http://pr0gr4mm3r.com/mysql/writing-secure-sql-queries/feed/" rel="self" type="application/rss+xml" />
	<link>http://pr0gr4mm3r.com/mysql/writing-secure-sql-queries/</link>
	<description>Free tools and information maintained by an online entrepreneur.</description>
	<lastBuildDate>Thu, 26 Aug 2010 20:35:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Andrew Wells</title>
		<link>http://pr0gr4mm3r.com/mysql/writing-secure-sql-queries/comment-page-1/#comment-5682</link>
		<dc:creator>Andrew Wells</dc:creator>
		<pubDate>Mon, 03 Mar 2008 05:21:36 +0000</pubDate>
		<guid isPermaLink="false">http://wp.pr0gr4mm3r.com/mysql/writing-secure-sql-queries/#comment-5682</guid>
		<description>Yeah, Wordpress likes to mess with my quotes.  I have been looking into how to disable that fancy formatting.

That&#039;s a good idea with putting in that magic quotes test.  I was escaping strings on this one server, and everything was being outputted with extra backslashes.  Turned out it was because &quot;magic_quotes_gpc&quot; was enabled.  I always disable that function whenever possible because I secure it myself.</description>
		<content:encoded><![CDATA[<p>Yeah, WordPress likes to mess with my quotes.  I have been looking into how to disable that fancy formatting.</p>
<p>That&#8217;s a good idea with putting in that magic quotes test.  I was escaping strings on this one server, and everything was being outputted with extra backslashes.  Turned out it was because &#8220;magic_quotes_gpc&#8221; was enabled.  I always disable that function whenever possible because I secure it myself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://pr0gr4mm3r.com/mysql/writing-secure-sql-queries/comment-page-1/#comment-5681</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 03 Mar 2008 05:00:15 +0000</pubDate>
		<guid isPermaLink="false">http://wp.pr0gr4mm3r.com/mysql/writing-secure-sql-queries/#comment-5681</guid>
		<description>I knew about SQL injection, but I actually never tried it. I copied your sample into a login form on my site (after removing the escape logic), and it does work. Neat-O! (I had to replace all those funky quotes in your sample code though). 

I escape the user input in my PHP code with this function:
[code]
function escapeData($data)
{
	if(ini_get(&#039;magic_quotes_gpc&#039;))
		$data = stripslashes($data);
	return mysql_real_escape_string($data);
}
[/code]
It&#039;s more portable than just using mysql_real_escape_string() everywhere.</description>
		<content:encoded><![CDATA[<p>I knew about SQL injection, but I actually never tried it. I copied your sample into a login form on my site (after removing the escape logic), and it does work. Neat-O! (I had to replace all those funky quotes in your sample code though). </p>
<p>I escape the user input in my PHP code with this function:<br />
[code]<br />
function escapeData($data)<br />
{<br />
	if(ini_get('magic_quotes_gpc'))<br />
		$data = stripslashes($data);<br />
	return mysql_real_escape_string($data);<br />
}<br />
[/code]<br />
It&#8217;s more portable than just using mysql_real_escape_string() everywhere.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
