<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "write to a txt file in php been working on this for a week"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "write to a txt file in php been working on this for a week"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>write to a txt file in php been working on this for a week</title>
				<description><![CDATA[ I need this to right  the form content to the txt file if you know how help me please ive been trying for a week<br /> <br /> this is the form in message.php<br /> &lt;?php<br /> &lt;form name="form1" method="post" action="messageboard.php" &gt;<br /> &lt;input type="name" name="name" value="name"&gt; &lt;/form&gt;<br /> ?&gt;<br /> this is the messageboard.php<br /> <br /> &lt;?php<br /> $filename = 'mail.txt';<br /> $somecontent = ("test this is what is posted to mail.txt");<br /> <br /> // Let's make sure the file exists and is writable first.<br /> if (is_writable($filename)) {<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() it.<br />     if (!$handle = fopen($filename, 'a')) {<br />          print "Cannot open file ($filename)";<br />          exit;<br />     }<br /> <br />     // Write $somecontent to our opened file.<br />     if (!fwrite($handle, $new)) {<br />         print "Cannot write to file ($filename)";<br />         exit;<br />     }<br />     <br />     print "Success, wrote ($new) to file ($filename)";<br />     <br />     fclose($handle);<br /> 					<br /> } else {<br />     print "The file $filename is not writable";<br /> }<br /> ?&gt;]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/2285/5992.php</guid>
				<link>https://proxy2.de/forum/posts/preList/2285/5992.php</link>
				<pubDate><![CDATA[Thu, 21 Aug 2003 02:44:02]]> GMT</pubDate>
				<author><![CDATA[ dbztoolkit]]></author>
			</item>
			<item>
				<title>try this, doesn't work let me know</title>
				<description><![CDATA[ try this, doesn't work let me know<br /> <br /> this is the messageboard.php <br /> [code]<br /> &lt;?php <br /> $filename = 'mail.txt'; <br /> $somecontent = &quot;test this is what is posted to mail.txt&quot;;<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 /> $handle = fopen&#40;$filename, 'a'&#41;;<br /> if &#40;!$handle&#41; &#123;<br />   fclose&#40;$handle&#41;; <br />   exit&#40;&quot;Cannot open file &#40;$filename&#41;&quot;&#41;; <br /> &#125;<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 />   // Write $somecontent to our opened file. <br />   if &#40;!fwrite&#40;$handle, $new&#41;&#41;&#123;<br />     fclose&#40;$handle&#41;; <br />     exit&#40;&quot;&#40;$filename&#41; is not writable&quot;&#41; ;<br />   &#125;<br /> <br />   echo &quot;Success, wrote $new to file $filename&quot;; <br /> &#125;<br /> <br /> fclose&#40;$handle&#41;; <br /> ?&gt;[/code]]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/2285/5998.php</guid>
				<link>https://proxy2.de/forum/posts/preList/2285/5998.php</link>
				<pubDate><![CDATA[Thu, 21 Aug 2003 16:18:40]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
	</channel>
</rss>