<?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: Creating a PHP CMS – Part 3</title>
	<atom:link href="http://fwebde.com/web-design/creating-a-php-cms-part-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/</link>
	<description>Helping people to make fantastic websites, whether you are a designer, a developer, or someone just who loves websites.</description>
	<lastBuildDate>Sun, 05 Sep 2010 13:54:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Eric Bannatyne</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-2044</link>
		<dc:creator>Eric Bannatyne</dc:creator>
		<pubDate>Fri, 27 Aug 2010 17:43:17 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-2044</guid>
		<description>If you&#039;re getting errors with mysql_real_escape_string, that probably means that there is a problem with your connection to the MySQL database.

Remember: When inserting data into a database using these methods it is always &lt;strong&gt;crucial&lt;/strong&gt; to sanitize your inputs using mysql_real_escape_string, doing otherwise would be a huge security risk (See the SQL injection section of &lt;a href=&quot;http://fwebde.com/programming/hack-your-own-site/&quot;&gt;Hack Your Own Site&lt;/a&gt;. That article also mentions using prepared statements, a &quot;newer&quot; way of doing this, which is not mentioned in this article.</description>
		<content:encoded><![CDATA[<p>If you're getting errors with mysql_real_escape_string, that probably means that there is a problem with your connection to the MySQL database.</p>
<p>Remember: When inserting data into a database using these methods it is always <strong>crucial</strong> to sanitize your inputs using mysql_real_escape_string, doing otherwise would be a huge security risk (See the SQL injection section of <a href="http://fwebde.com/programming/hack-your-own-site/">Hack Your Own Site</a>. That article also mentions using prepared statements, a "newer" way of doing this, which is not mentioned in this article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cathy</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-2043</link>
		<dc:creator>cathy</dc:creator>
		<pubDate>Fri, 27 Aug 2010 13:21:20 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-2043</guid>
		<description>I have tried this code, initially i got errors refering to &quot;mysql_real_escape_string&quot;

I decideed to remove this and just use &quot;$title = $_GET[&#039;title&#039;];&quot;.

I now hav enoerrors but the data is not saving, Am I doin fsomething wrong?</description>
		<content:encoded><![CDATA[<p>I have tried this code, initially i got errors refering to "mysql_real_escape_string"</p>
<p>I decideed to remove this and just use "$title = $_GET['title'];".</p>
<p>I now hav enoerrors but the data is not saving, Am I doin fsomething wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Bannatyne</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-95</link>
		<dc:creator>Eric Bannatyne</dc:creator>
		<pubDate>Thu, 20 Aug 2009 03:07:25 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-95</guid>
		<description>Kabarovsky: This is probably not the case, but you can try making sure that the value of the &#039;name&#039; attributes in your form fields match your $_POST values.</description>
		<content:encoded><![CDATA[<p>Kabarovsky: This is probably not the case, but you can try making sure that the value of the 'name' attributes in your form fields match your $_POST values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Bannatyne</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-92</link>
		<dc:creator>Eric Bannatyne</dc:creator>
		<pubDate>Wed, 19 Aug 2009 01:52:24 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-92</guid>
		<description>The quotes are really mostly extra protection, just in case... :P</description>
		<content:encoded><![CDATA[<p>The quotes are really mostly extra protection, just in case... :P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hua Chen</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-91</link>
		<dc:creator>Hua Chen</dc:creator>
		<pubDate>Wed, 19 Aug 2009 01:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-91</guid>
		<description>I also afraid of SQL injection, but didn&#039;t mysql_real_escape_string has already prevent it? Can you help me Google it in Google English or ask your friends about it? Thanks!</description>
		<content:encoded><![CDATA[<p>I also afraid of SQL injection, but didn't mysql_real_escape_string has already prevent it? Can you help me Google it in Google English or ask your friends about it? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Bannatyne</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-90</link>
		<dc:creator>Eric Bannatyne</dc:creator>
		<pubDate>Tue, 18 Aug 2009 16:26:12 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-90</guid>
		<description>Hua Chen: There are some speed differences. I think that the quotes may also help to prevent SQL injection, but I&#039;m not completely sure.</description>
		<content:encoded><![CDATA[<p>Hua Chen: There are some speed differences. I think that the quotes may also help to prevent SQL injection, but I'm not completely sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hua Chen</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-88</link>
		<dc:creator>Hua Chen</dc:creator>
		<pubDate>Tue, 18 Aug 2009 16:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-88</guid>
		<description>I have compared the speed of these two, the one with single quotes took double the time to the one without single quotes. I also write a blog post about that:http://blog.huachen.me/php-sql-quote-string . But I just don&#039;t know why should always add that?</description>
		<content:encoded><![CDATA[<p>I have compared the speed of these two, the one with single quotes took double the time to the one without single quotes. I also write a blog post about that:http://blog.huachen.me/php-sql-quote-string . But I just don't know why should always add that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Bannatyne</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-86</link>
		<dc:creator>Eric Bannatyne</dc:creator>
		<pubDate>Tue, 18 Aug 2009 15:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-86</guid>
		<description>Kabarovsky: This may have something to do with your database configuration. I don&#039;t have access to your DB, so I&#039;m not sure what the problem could be.

Hua Chen: I guess it&#039;s just what I&#039;m used to, like how I always use quotes around the values of HTML attributes.</description>
		<content:encoded><![CDATA[<p>Kabarovsky: This may have something to do with your database configuration. I don't have access to your DB, so I'm not sure what the problem could be.</p>
<p>Hua Chen: I guess it's just what I'm used to, like how I always use quotes around the values of HTML attributes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hua Chen</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-81</link>
		<dc:creator>Hua Chen</dc:creator>
		<pubDate>Tue, 18 Aug 2009 13:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-81</guid>
		<description>A question for you:
Why you add the single quotes in the SQL query string: mysql_query(&quot;INSERT INTO pages (title, body, date) VALUES (&#039;$title&#039;, &#039;$body&#039;, &#039;$date&#039;)&quot;); ?
If you delete these single quotes, it will also work well.
Can you tell me why? Thanks!</description>
		<content:encoded><![CDATA[<p>A question for you:<br />
Why you add the single quotes in the SQL query string: mysql_query("INSERT INTO pages (title, body, date) VALUES ('$title', '$body', '$date')"); ?<br />
If you delete these single quotes, it will also work well.<br />
Can you tell me why? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hua Chen</title>
		<link>http://fwebde.com/web-design/creating-a-php-cms-part-3/comment-page-1/#comment-80</link>
		<dc:creator>Hua Chen</dc:creator>
		<pubDate>Tue, 18 Aug 2009 13:41:36 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=275#comment-80</guid>
		<description>Very well using mysql_real_escape_string, it is very important!
But you miss a small thing, you forget to set the default timezone when using time() function.
If you know Chinese, you can have a look at my blog post: http://blog.huachen.me/php-beijing-time, but if you don&#039;t know Chinese, you can also search the php function date_default_timezone_set() for answer! ^_^</description>
		<content:encoded><![CDATA[<p>Very well using mysql_real_escape_string, it is very important!<br />
But you miss a small thing, you forget to set the default timezone when using time() function.<br />
If you know Chinese, you can have a look at my blog post: <a href="http://blog.huachen.me/php-beijing-time">http://blog.huachen.me/php-beijing-time</a>, but if you don't know Chinese, you can also search the php function date_default_timezone_set() for answer! ^_^</p>
]]></content:encoded>
	</item>
</channel>
</rss>
