<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1023573" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1023573</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/insert-seems-work-half-time#comment-1144986</link>
    <description> &lt;p&gt;that&#039;s actually what clean does. =o)&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;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;clean&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$userInput&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;){ &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;# preps for db entry by \&quot;cleaning\&quot; html&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;addslashes&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;htmlentities&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;trim&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;stripslashes&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;rawurldecode&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$userInput&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))), &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ENT_QUOTES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;));&lt;br /&gt;&amp;nbsp; return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&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;tha t has al the &#039; and &quot; get converted to the html entities and then incase there&#039;s anything else, it gets a \, so i probalby do overkill, but it&#039;s definitely covered&lt;/p&gt;
&lt;p&gt;and it hasn&#039;t failed since i put in the debug statement.. i still have no clue why&lt;/p&gt;
 </description>
     <pubDate>Mon, 26 Jan 2004 04:24:16 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1144986 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/insert-seems-work-half-time#comment-1144853</link>
    <description> &lt;p&gt;i am not sure what the function &#039;clean&#039; does, but you might need to escape values before putting them into a query. like this:&lt;/p&gt;
&lt;p&gt;$bq1=mysql_escape_string(clean($_POST[&#039;bq1&#039;]));&lt;br /&gt;
$bq2=mysql_escape_string(clean($_POST[&#039;bq2&#039;]));&lt;/p&gt;
&lt;p&gt;etc...&lt;/p&gt;
&lt;p&gt;if a user enters &#039; mark somewhere, your query will break. SQL will treat it as the end of the current value (since u use &#039; marks to denote text in the query).&lt;/p&gt;
 </description>
     <pubDate>Fri, 23 Jan 2004 05:37:43 +0000</pubDate>
 <dc:creator>antoshka</dc:creator>
 <guid isPermaLink="false">comment 1144853 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/insert-seems-work-half-time#comment-1144836</link>
    <description> &lt;p&gt;try it like this and see what is the error whe it doesn&#039;t work&lt;/p&gt;
&lt;p&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: #FF8000&quot;&gt;# connect to db and add bio and interest table entries&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$db&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_connect&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$host&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$login1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pass1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) or die(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;cannot access mysql\&quot;); # connect&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fyd&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_select_db(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$dbname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$db&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) or die(\&quot;cannot access db\&quot;); # select the db&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$addbio&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_query(\&quot;INSERT INTO bio (uid, bq1, bq2, bq3, bq4, auth, bio) VALUES&lt;br /&gt;(&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$uid&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;, &#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bq1&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;, &#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bq2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;, &#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bq3&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;, &#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bq4&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;, &#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$auth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;, &#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bio&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;)\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$db&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;# insert bio info into bio table&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$SQL&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;INSERT INTO interests (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$iiif&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) VALUES (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$iiiv&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)\&quot;&lt;br /&gt;&amp;nbsp; if(!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$addinterests&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$SQL&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$db&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;))&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo mysql_error().\&quot;&amp;lt;br \&amp;gt;\&quot;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$SQL&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;# insert interests into interests table&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
like this you should be able to view the query whe it fails and see if you have a logic error in building $iiif and $iiiv&lt;/p&gt;
 </description>
     <pubDate>Thu, 22 Jan 2004 22:01:01 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1144836 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
