<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1040383" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1040383</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227436</link>
    <description> &lt;p&gt;&lt;strong&gt;mscreashuns&lt;/strong&gt;: I kinda understand, but I will probably be raking wikipedia before the nights out.&lt;br /&gt;
Cheers for ur reply. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 Dec 2007 17:07:48 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1227436 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227433</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: OMFG!!! T^hat is soo scary! will this simple escape string script prevent that? (the video)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yup, that function escapes characters like single quotes (&#039;) to prevent attacks like this.  Just make sure that you escape your inputs and enclose your fields in single quotes (which you are already doing) when you write SQL queries.&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: Thanks Programmer, you have really helped me out these last few days, I am very greatful for everything. and good luck with your own website too.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You&#039;re welcome.  Glad to be a help. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 Dec 2007 15:35:26 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1227433 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227427</link>
    <description> &lt;p&gt;I can&#039;t think of the exact technical way to explain this, but just think of it like this:&lt;/p&gt;
&lt;p&gt;PHP is a server-side language that works with the server to render the code.  This code is output to the user&#039;s computer as HTML, and so there actually is no PHP in the page source.  The PHP lies in the file itself, but the viewer only sees the web page.&lt;/p&gt;
&lt;p&gt;Does that make any more sense to you than it sounds like it does? &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/tongue.png&quot; title=&quot;Sticking out tongue&quot; alt=&quot;Sticking out tongue&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 Dec 2007 12:46:35 +0000</pubDate>
 <dc:creator>mscreashuns</dc:creator>
 <guid isPermaLink="false">comment 1227427 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227418</link>
    <description> &lt;p&gt;OMFG!!! T^hat is soo scary! will this simple escape string script prevent that? (the video)&lt;/p&gt;
&lt;p&gt;can someone please try and do that injection thing on my website, I want to see if it will hold out.&lt;/p&gt;
&lt;p&gt;I noticed something... when I upload, then take a look at the online source (via browser) the php script is hidden, how, and why is that? Its good, as it hides the page&#039;s tasks and technology, plus if someone copies, and pastes, it wont work properly, but why does it do it? surly there is a more technical reason, not just for security.&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 Dec 2007 11:42:18 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1227418 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227417</link>
    <description> &lt;p&gt;interesting... IDK why someone would want to wreck anothers hard work, but thats why we all have firewalls i guess &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/eyeroll.png&quot; title=&quot;Roll eyes&quot; alt=&quot;Roll eyes&quot; class=&quot;smiley-content&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Thanks Programmer, you have really helped me out these last few days, I am very greatful for everything. and good luck with your own website too.&lt;br /&gt;
Thanks again.&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 Dec 2007 11:36:56 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1227417 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227407</link>
    <description> &lt;p&gt;Yes, that looks good.  As for your SQL injection question, here are a couple of resources that could explain it better than I can.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/SQL_injection&quot; class=&quot;bb-url&quot;&gt;http://en.wikipedia.org/wiki/SQL_injection&lt;/a&gt; - Wikipedia article on it&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://unixwiz.net/techtips/sql-injection.html&quot; class=&quot;bb-url&quot;&gt;http://unixwiz.net/techtips/sql-injection.html&lt;/a&gt; - Several examples&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=MJNJjh4jORY&quot; class=&quot;bb-url&quot;&gt;http://www.youtube.com/watch?v=MJNJjh4jORY&lt;/a&gt; - Video with the use of SQL injection to break into a university site.&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 Dec 2007 04:16:30 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1227407 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227400</link>
    <description> &lt;p&gt;right, just so we clear, this is my current newsletter process file...&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;include(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;dbconnect.php\&quot;);&lt;br /&gt;mysql_select_db(pcgenius_members)&lt;br /&gt;or die (\&quot;Could not select database because \&quot;.mysql_error());&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$category&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_real_escape_string(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;category&#039;]); &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$email&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_real_escape_string(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;email&#039;]); &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$check&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;select email from newsletter where email = &#039;\&quot;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;email&#039;].\&quot;&#039;\&quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qry&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$check&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)&lt;br /&gt;or die (\&quot;Could not match data because \&quot;.mysql_error());&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$num_rows&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_num_rows(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qry&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$num_rows&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; != 0) {&lt;br /&gt;header(&#039;location: email_taken.php&#039;);&lt;br /&gt;} else {&lt;br /&gt;mysql_query(\&quot;INSERT INTO `newsletter` VALUES (&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$category&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;, &#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$email&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;)\&quot;); &lt;br /&gt;header(&#039;location: registered.php&#039;); &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;look OK?&lt;/p&gt;
 </description>
     <pubDate>Sun, 16 Dec 2007 23:35:27 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1227400 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227399</link>
    <description> &lt;p&gt;aha, sorted, this is OK. but what exactly would a malicious programmer be able to do with the previous version?&lt;br /&gt;
 in other words, what harm would queries hold? as long as they arent &quot;INSERT&quot;s&lt;/p&gt;
 </description>
     <pubDate>Sun, 16 Dec 2007 23:33:01 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1227399 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227396</link>
    <description> &lt;p&gt;Yup, that&#039;s all that&#039;s needed.  You might have to connect to the database before you run that though.  Just move the mysql_select_db(pcgenius_members) or die (&quot;Could not select database because &quot;.mysql_error()); line to the top.&lt;/p&gt;
 </description>
     <pubDate>Sun, 16 Dec 2007 23:09:43 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1227396 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/php-database-check-simple#comment-1227395</link>
    <description> &lt;p&gt;OK, would that by any chance do this?&lt;/p&gt;
&lt;p&gt;replace...&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$fname&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;fname&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]); &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;with...&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$fname&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_real_escape_string&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;fname&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]); &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Is that what you mean?&lt;/p&gt;
 </description>
     <pubDate>Sun, 16 Dec 2007 22:51:18 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1227395 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
