<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1034734" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1034734</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/easy-php-question#comment-1201844</link>
    <description> &lt;p&gt;@adjroth&lt;/p&gt;
&lt;p&gt;been a great help so far, &lt;/p&gt;
&lt;p&gt;The code is correct at checking the files, thats why i said i arrived at the same code using the while earlier, the problem lies in writing the concatenate, im figuring it out now by using string.drop command ...&lt;/p&gt;
&lt;p&gt;Thanks for the additional tip, Ill check it out...&lt;/p&gt;
 </description>
     <pubDate>Sun, 11 Jun 2006 05:26:54 +0000</pubDate>
 <dc:creator>demonhale</dc:creator>
 <guid isPermaLink="false">comment 1201844 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/easy-php-question#comment-1201842</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: Anyways, another question, whats the security issue if I saved a file to html directly rather than on a txt file, and allowing html codes on the textarea,? Any light on this...?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If this is a forum, profile entry, or any other related where other users will view these files, then there is a high security risk. Users may use script, iframe, or activex to run harmful software from your site, or run videos or music. &lt;/p&gt;
&lt;p&gt;You may want to use &quot;strip_tags&quot; to strip the html tags. more information on this function can be found here &lt;a href=&quot;http://us3.php.net/manual/en/function.strip-tags.php&quot; class=&quot;bb-url&quot;&gt;http://us3.php.net/manual/en/function.strip-tags.php&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 11 Jun 2006 05:13:22 +0000</pubDate>
 <dc:creator>adjroth</dc:creator>
 <guid isPermaLink="false">comment 1201842 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/easy-php-question#comment-1201840</link>
    <description> &lt;p&gt;yes, you&#039;re right. what i mean to do was this ... &lt;/p&gt;
&lt;p&gt;checks for &quot;test.txt&quot; then &quot;test1.txt&quot; then &quot;test2.txt&quot; and so on ...&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$fileexist = $filename . &amp;#039;.txt&amp;#039;;&lt;br /&gt;if (file_exists($fileexist))&lt;br /&gt;{&lt;br /&gt;	$newfile = 0;&lt;br /&gt;	while (file_exists($fileexist))&lt;br /&gt;	{&lt;br /&gt;		$newfile = $newfile + 1;&lt;br /&gt;		$fileexist = $filename.$newfile.&amp;#039;.txt&amp;#039;; //if you get an error here replace with $fileexist = $filename.&amp;#039;&amp;#039;.$newfile.&amp;#039;.txt&amp;#039;;&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;echo file_exists($fileexist) ? &amp;quot;File Already Exists, new filename: $filename&amp;quot; : &amp;#039;File Created&amp;#039;;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 11 Jun 2006 05:04:16 +0000</pubDate>
 <dc:creator>adjroth</dc:creator>
 <guid isPermaLink="false">comment 1201840 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/easy-php-question#comment-1201839</link>
    <description> &lt;p&gt;@adjroth&lt;/p&gt;
&lt;p&gt;Thanks for the rewrite, actually I used the same mehotd as you, using the while loop, the difference is i append filenames like this &quot;test.txt&quot; if duplicate &quot;test1.txt&quot; if duplicate &quot;test11.txt&quot; and so on...&lt;/p&gt;
&lt;p&gt;What happens with yours is like this, &quot;test.txt&quot; if duplicate &quot;test1.txt&quot; then becomes &quot;test12.txt&quot; then &quot;test123.txt&quot; ... I think i need to clear $newfile = 0 again at the end... But really good help...&lt;/p&gt;
&lt;p&gt;Anyways, another question, whats the security issue if I saved a file to html directly rather than on a txt file, and allowing html codes on the textarea,? Any light on this...?&lt;/p&gt;
 </description>
     <pubDate>Sun, 11 Jun 2006 04:56:47 +0000</pubDate>
 <dc:creator>demonhale</dc:creator>
 <guid isPermaLink="false">comment 1201839 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/easy-php-question#comment-1201807</link>
    <description> &lt;p&gt;If you&#039;re wanting it to return &quot;2&quot; instead of &quot;11&quot;, why not add them together instead of concatenating?&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Jun 2006 18:31:44 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1201807 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/easy-php-question#comment-1201798</link>
    <description> &lt;p&gt;i added a while loop to keep trying, starts at 1 and keeps going up until file_exists returns true.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$fileexist = $filename . &amp;#039;.txt&amp;#039;;&lt;br /&gt;if (file_exists($fileexist))&lt;br /&gt;{&lt;br /&gt;	$newfile = 0;&lt;br /&gt;	while (file_exists($fileexist))&lt;br /&gt;	{&lt;br /&gt;		$newfile = $newfile + 1;&lt;br /&gt;		$filename = $filename.&amp;#039;&amp;#039;.$newfile;&lt;br /&gt;		$fileexist = $filename . &amp;#039;.txt&amp;#039;;&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;echo file_exists($fileexist) ? &amp;quot;File Already Exists, new filename: $filename&amp;quot; : &amp;#039;File Created&amp;#039;;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Jun 2006 15:33:37 +0000</pubDate>
 <dc:creator>adjroth</dc:creator>
 <guid isPermaLink="false">comment 1201798 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/easy-php-question#comment-1201784</link>
    <description> &lt;p&gt;Kinda figured to non-duplicate but its messy... if anyone got an idea for a cleaner version, it would be good...&lt;/p&gt;
&lt;p&gt;I used a filecheck with the getcw command, then if it returns true I apend &quot;1&quot; then &quot;11&quot;&lt;/p&gt;
&lt;p&gt;It works but what i intended was &quot;1&quot; then &quot;2&quot; ,&lt;/p&gt;
&lt;p&gt;well anyways, it works at the moment so no problem...&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Jun 2006 03:28:50 +0000</pubDate>
 <dc:creator>demonhale</dc:creator>
 <guid isPermaLink="false">comment 1201784 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
