<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>HTML Help</title>
  <link>http://www.htmlcodetutorial.com/help/index.php</link>
  <description>Please &lt;a href=&quot;http://www.htmlcodetutorial.com/help/search.php&quot;&gt;Search&lt;/a&gt; for the answer to your question before asking it! Thanks.</description>
  <language>english</language>
  <copyright>(c) Copyright 2009 by HTML Help</copyright>
  <managingEditor>design@htmlcodetutorial.com</managingEditor>
  <webMaster>design@htmlcodetutorial.com</webMaster>
  <pubDate>Sat Nov 21, 2009 1:27 pm</pubDate>
  <lastBuildDate>Sat Nov 21, 2009 1:27 pm</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>HTML Help</title>
    <url></url>
    <link>http://www.htmlcodetutorial.com/help/</link>
    <description>Please &lt;a href=&quot;http://www.htmlcodetutorial.com/help/search.php&quot;&gt;Search&lt;/a&gt; for the answer to your question before asking it! Thanks.</description>
  </image>

                                      <item>
                                        <title>Re: Saving form data to a csv file</title>
                                        <link>http://www.htmlcodetutorial.com/help/viewtopic.php?p=22041#22041</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.htmlcodetutorial.com/help/profile.php?mode=viewprofile&amp;u=10167'&gt;marynorn&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 21, 2006 2:48 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Nifty!  Thanks &lt;img src=&quot;images/smiles/icon_smile.gif&quot; alt=&quot;Smile&quot; border=&quot;0&quot; /&gt;</description>
                                        <comments>http://www.htmlcodetutorial.com/help/viewtopic.php?p=22041#22041</comments>
                                        <author>marynorn</author>
                                        <pubDate>Thu Sep 21, 2006 2:48 pm</pubDate>
                                        <guid isPermaLink="true">http://www.htmlcodetutorial.com/help/viewtopic.php?p=22041#22041</guid>
                                      </item>
                                      <item>
                                        <title>Re: Saving form data to a csv file</title>
                                        <link>http://www.htmlcodetutorial.com/help/viewtopic.php?p=22021#22021</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.htmlcodetutorial.com/help/profile.php?mode=viewprofile&amp;u=1398'&gt;degsy&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 21, 2006 6:21 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      basic example from here&lt;br /&gt;
&lt;a href=&quot;http://uk2.php.net/manual/en/function.fwrite.php&quot; target=&quot;_blank&quot;&gt;http://uk2.php.net/manual/en/function.fwrite.php&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;br /&gt;&lt;tr&gt; &lt;br /&gt;	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;br /&gt;	&lt;/tr&gt;&lt;br /&gt;	&lt;tr&gt;&lt;br /&gt;	  &lt;td class=&quot;code&quot;&gt;&lt;br /&gt;
&amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http&amp;#58;//www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=iso-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
if&amp;#40;isset&amp;#40;$_POST&amp;#91;'Submit'&amp;#93;&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$name = $_POST&amp;#91;'name'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$email = $_POST&amp;#91;'email'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$comment = $_POST&amp;#91;'comment'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$err = '';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if&amp;#40;trim&amp;#40;$name&amp;#41;==''&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$err .= '-Please enter a name&amp;lt;br&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if&amp;#40;empty&amp;#40;$email&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$err .= '-Please enter an email address';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if&amp;#40;strlen&amp;#40;$comment&amp;#41;==0&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$err .= '-Please enter a comment&amp;lt;br&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if&amp;#40;$err!=''&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;echo $err;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;else&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$filename = 'file.txt';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$somecontent = $name . ',' . $email . ',' . $comment . &amp;quot;\n&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Let's make sure the file exists and is writable first.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if &amp;#40;is_writable&amp;#40;$filename&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// In our example we're opening $filename in append mode.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// The file pointer is at the bottom of the file hence &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// that's where $somecontent will go when we fwrite&amp;#40;&amp;#41; it.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if &amp;#40;!$handle = fopen&amp;#40;$filename, 'a'&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; echo &amp;quot;Cannot open file &amp;#40;$filename&amp;#41;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Write $somecontent to our opened file.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if &amp;#40;fwrite&amp;#40;$handle, $somecontent&amp;#41; === FALSE&amp;#41; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;echo &amp;quot;Cannot write to file &amp;#40;$filename&amp;#41;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;echo &amp;quot;Success, wrote &amp;#40;$somecontent&amp;#41; to file &amp;#40;$filename&amp;#41;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;fclose&amp;#40;$handle&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125; else &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;echo &amp;quot;The file $filename is not writable&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form name=&amp;quot;form1&amp;quot; method=&amp;quot;post&amp;quot; action=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;p&amp;gt;Name&amp;#58; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;input name=&amp;quot;name&amp;quot; type=&amp;quot;text&amp;quot; id=&amp;quot;name&amp;quot; value=&amp;quot;Joe&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Email&amp;#58; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;input name=&amp;quot;email&amp;quot; type=&amp;quot;text&amp;quot; id=&amp;quot;email&amp;quot; value=&amp;quot;joe@email.com&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;nbsp; Comment&amp;#58;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;p&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;textarea name=&amp;quot;comment&amp;quot;&amp;gt;This is my comment&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;p&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;Submit&amp;quot; value=&amp;quot;Submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;/td&gt;&lt;br /&gt;	&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
                                        <comments>http://www.htmlcodetutorial.com/help/viewtopic.php?p=22021#22021</comments>
                                        <author>degsy</author>
                                        <pubDate>Thu Sep 21, 2006 6:21 am</pubDate>
                                        <guid isPermaLink="true">http://www.htmlcodetutorial.com/help/viewtopic.php?p=22021#22021</guid>
                                      </item>
                                      <item>
                                        <title>Re: Saving form data to a csv file</title>
                                        <link>http://www.htmlcodetutorial.com/help/viewtopic.php?p=21972#21972</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.htmlcodetutorial.com/help/profile.php?mode=viewprofile&amp;u=10167'&gt;marynorn&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Sep 18, 2006 4:32 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Thanks for the links, I get the feeling that &lt;span style=&quot;font-style: italic&quot;&gt;should&lt;/span&gt; be a very simple thing to do, if only I knew the right questions to ask.  &lt;img src=&quot;images/smiles/icon_redface.gif&quot; alt=&quot;Embarassed&quot; border=&quot;0&quot; /&gt;   That's the problem with being self-taught: you never know where the gaps in your knowledge are.</description>
                                        <comments>http://www.htmlcodetutorial.com/help/viewtopic.php?p=21972#21972</comments>
                                        <author>marynorn</author>
                                        <pubDate>Mon Sep 18, 2006 4:32 pm</pubDate>
                                        <guid isPermaLink="true">http://www.htmlcodetutorial.com/help/viewtopic.php?p=21972#21972</guid>
                                      </item>
                                      <item>
                                        <title>Re: Saving form data to a csv file</title>
                                        <link>http://www.htmlcodetutorial.com/help/viewtopic.php?p=21952#21952</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.htmlcodetutorial.com/help/profile.php?mode=viewprofile&amp;u=1398'&gt;degsy&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Sep 18, 2006 5:33 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Stick with PHP then. PHp can grab form data and write it to a text file.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.w3schools.com/php/php_post.asp&quot; target=&quot;_blank&quot;&gt;http://www.w3schools.com/php/php_post.asp&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.w3schools.com/php/php_file.asp&quot; target=&quot;_blank&quot;&gt;http://www.w3schools.com/php/php_file.asp&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://uk.php.net/manual/en/function.fwrite.php&quot; target=&quot;_blank&quot;&gt;http://uk.php.net/manual/en/function.fwrite.php&lt;/a&gt;</description>
                                        <comments>http://www.htmlcodetutorial.com/help/viewtopic.php?p=21952#21952</comments>
                                        <author>degsy</author>
                                        <pubDate>Mon Sep 18, 2006 5:33 am</pubDate>
                                        <guid isPermaLink="true">http://www.htmlcodetutorial.com/help/viewtopic.php?p=21952#21952</guid>
                                      </item>
                                      <item>
                                        <title>Saving form data to a csv file</title>
                                        <link>http://www.htmlcodetutorial.com/help/viewtopic.php?p=21881#21881</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.htmlcodetutorial.com/help/profile.php?mode=viewprofile&amp;u=10167'&gt;marynorn&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Fri Sep 15, 2006 11:05 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I've been using formmail for a while to gather data on-line.  However, I'm now receiving so much data that yanking it out of e-mails and putting it into Excel manually is a time consuming pain in the butt.  I know it's possible to set up a cgi script that sends form data to a csv file that could be downloaded at the end of every week, but I have no idea how.&lt;br /&gt;
&lt;br /&gt;
Any help on this subject would be appreciated.  &lt;br /&gt;
&lt;br /&gt;
(I have experience with HTML and CSS, have a vague idea what mySQL and PHP are, and am completely clueless about CGI and Perl)</description>
                                        <comments>http://www.htmlcodetutorial.com/help/viewtopic.php?p=21881#21881</comments>
                                        <author>marynorn</author>
                                        <pubDate>Fri Sep 15, 2006 11:05 am</pubDate>
                                        <guid isPermaLink="true">http://www.htmlcodetutorial.com/help/viewtopic.php?p=21881#21881</guid>
                                      </item></channel></rss>