<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Msg system with txt file"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "Msg system with txt file"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Msg system with txt file</title>
				<description><![CDATA[ now here comes my hard part i trying to make a msg system and i want a user to be able to write to  any txt file they want<br /> im using something like this for my messageboard but i need it so the users can type in what file they wnt to write it now it writeing to mail.txt  the user they will message to will have there own txt file like if you would sign up it will create like php-forums.txt <br /> and if someone wanted to messge you they would type in php-fourms and it will send there info to php-fourms.txt <br /> this is the code i would need chaged dotn know how to do this can anyone help <br /> this is the pice of the code i think needs to be changed<br /> [code]<br /> $filename = 'mail.txt';<br /> [/code]<br /> but here is the whole code<br /> [code]&lt;?php<br /> $filename= 'mail.txt';<br /> $name=$HTTP_POST_VARS&#91;'message'&#93;;<br /> <br /> <br /> // Let's make sure the file exists and is writable first.<br /> if &#40;is_writable&#40;$filename&#41;&#41; &#123;<br /> <br />     // In our example we're opening $filename in append mode.<br />     // The file pointer is at the bottom of the file hence <br />     // that's where $somecontent will go when we fwrite&#40;&#41; it.<br />     if &#40;!$handle = fopen&#40;$filename, 'a'&#41;&#41; &#123;<br />          print &quot;Cannot open file &#40;$filename&#41;&quot;;<br />          exit;<br />     &#125;<br /> <br />     // Write $somecontent to our opened file.<br />     if &#40;!fwrite&#40;$handle, $name&#41;&#41; &#123;<br />         print &quot;Cannot write to file &#40;$filename&#41;&quot;;<br />         exit;<br />     &#125;<br />     <br />     print &quot;Success, wrote &#40;$name&#41; &quot;;<br />     <br />     fclose&#40;$handle&#41;;<br /> 					<br /> &#125; else &#123;<br />     print &quot;The file $filename is not writable&quot;;<br /> &#125;<br /> ?&gt;[/code][/code]]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/2295/6024.php</guid>
				<link>https://proxy2.de/forum/posts/preList/2295/6024.php</link>
				<pubDate><![CDATA[Fri, 22 Aug 2003 23:36:22]]> GMT</pubDate>
				<author><![CDATA[ dbztoolkit]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ try <a class="snap_shots" href="http://www.php.net" target="_blank" rel="nofollow">http://www.php.net</a> and type in their search field writing to files and make sure you select in the drop down box next to it Online Documentation.<br /> <br /> Auron]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/2295/6028.php</guid>
				<link>https://proxy2.de/forum/posts/preList/2295/6028.php</link>
				<pubDate><![CDATA[Sat, 23 Aug 2003 13:13:13]]> GMT</pubDate>
				<author><![CDATA[ Auron]]></author>
			</item>
	</channel>
</rss>