<?xml version="1.0"?><rss version="2.0"><channel><title>Comments on Writing Secure PHP - AddedBytes.com</title><link>http://www.addedbytes.com/article/writing-secure-php/</link><description>Latest comments on Writing Secure PHP on AddedBytes.com</description><!-- ckey="76C662BB" --><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by web development &amp; programming ( &lt;a href="http://www.amcoitsystems.com"&gt;http://www.amcoitsystems.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Hi, I am project Manager and i delivered this blog to my PHP developer because i found great stuff.Thanks</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by My Webiste Adviser ( &lt;a href="http://www.mywebsiteadviser.com"&gt;http://www.mywebsiteadviser.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;SQL injection is a serious problem, you can add additional checks:&lt;br /&gt;
&lt;br /&gt;
$_GET['userid'] = str_replace(&quot;'&quot;, &quot;&quot;, $_GET['userid']);&lt;br /&gt;
Remove all ' symbols from the userid string.&lt;br /&gt;
&lt;br /&gt;
$_GET['userid'] = str_replace(&quot; &quot;, &quot;&quot;, $_GET['userid']);		&lt;br /&gt;
Remove all spaces from the userid string.&lt;br /&gt;
&lt;br /&gt;
$_GET['userid'] = trim( htmlspecialchars(addslashes($_GET['userid'])) );&lt;br /&gt;
Returns a string with backslashes before special characters and change special character (for example from &amp; to &amp;amp;&lt;br /&gt;
&lt;br /&gt;
All these steps will prevent your website from running malicious SQL scripts.</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by patrickd ( &lt;a href="http://infoos.net"&gt;http://infoos.net&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;thnx! you got great stuffs in here guys. learned a l0t</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by Phillip ( &lt;a href="http://humanbagel.com"&gt;http://humanbagel.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Decent list, but doesn't cover XSS, which is the most common exploit today.&lt;br /&gt;
Fix the SQL injection with the addslashes() function, easy fix. XSS is more difficult, but can be done with open source functions</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by mohamed rami ( &lt;a href=""&gt;&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Thanks Alot for This Article ,its very&lt;br /&gt;usefull</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by Alex Tokar ( &lt;a href="http://www.atokar.net/"&gt;http://www.atokar.net/&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Very nice article for new PHP developers.</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by techguide ( &lt;a href="http://http://www.devanggandhi.net/"&gt;http://http://www.devanggandhi.net/&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;I am new to PHP and this was really helpful</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by zyber16 ( &lt;a href=""&gt;&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Damn, I had that ' OR 1=1 # hole on my personal website, got it fixed thanks to this article :)</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by Adaptiv Media ( &lt;a href=""&gt;&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Thanks, the global variables section was a great help. Also grateful for your mod_rewrite article ;o)</description></item><item><title>Comment on Writing Secure PHP</title><link>http://www.addedbytes.com/article/writing-secure-php/comments/</link><guid>http://www.addedbytes.com/article/writing-secure-php/comments/</guid><description>Comment by A. ( &lt;a href=""&gt;&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Don't forget mysql_real_escape_string(), with it your script is protected against SQL injections. I even use it for session variables, you can never be too sure.&lt;br /&gt;&lt;br /&gt;Great article by the way.</description></item></channel></rss>