View Full Version : have form data write out to a text file

Jun 25th, 2009, 05:50 PM
Ok, so I have a website http://icocare.co.cc and On the contact us page there is a form. Now my webhosting service, 110mb, doesn't allow forms data to be sent to an email address without paying for it, so as an alternative way to get the data, you can have it sent to a text file instead, btu I don't know how to do that.

Here's the code of my form so far:

<form action="post" name="form_two" method="post">
<input type="hidden" value="post" name="confirmation_page" /> <fieldset> <label for="fname">First name:</label> <input type="text" value="" size="20" id="fname" /><br />
<label for="lname">Last Name:</label> <input type="text" value="" size="20" id="lname" /><br />
<label for="faddress">Address:</label> <input type="text" value="" size="20" id="faddress" /><br />
<label for="laddress">Address2:</label> <input type="text" value="" size="20" id="laddress" /><br />
<label for="city">City:</label> <input type="text" value="" size="20" id="city" /><br />
<label for="state">State:</label> <input type="text" value="" size="20" id="state" /><br />
<label for="country">Country:</label> <input type="text" value="" size="20" id="country" /><br />
<label for="zip">Zip/Postal Code:</label> <input type="text" value="" size="20" id="zip" /><br />
<label for="phone">Phone:</label> <input type="text" value="" size="20" id="phone" /><br />
<label for="fax">Fax:</label> <input type="text" value="" size="20" id="fax" /><br />
<label for="mobile">Mobile:</label> <input type="text" value="" size="20" id="mobile" /><br />
<label for="email">Email Address:</label> <input type="text" value="" size="20" id="email" /><br />
<label for="best time">Best Time to Contact:</label>
<select name="best time">
<option value="morning">Morning</option>
<option value="afternoon">Afternoon</option>
<option value="evening" selected="selected">Evening</option>
</select><br /><br>
<label for="preferred">Preferred Method of Contact:</label>
<select name="preferred">
<option value="phone">Phone</option>
<option value="fax">Fax</option>
<option value="email" selected="selected">Email</option>
<label for="comments">Comments,Questions,Special Interests:</label>
<textarea rows="5" cols="25">

<input type="submit" value="Submit" class="submit-btn" name="Submit" /> </fieldset>


Please help

Jun 25th, 2009, 08:20 PM
pleasee help. I haven't been able to find this anywhere. I don't think I have access to php because in my 110mb account fsockopen is not enabled neither is sendmail

Jun 26th, 2009, 05:34 PM
can somebody please help me? I don't know what else to do or where else to get help from. 110mb has been unhelpful as well.

Jun 26th, 2009, 06:03 PM
www.w3schools.com (http://www.w3schools.com/)

I have browsed and searched briefly for an answer with not much luck. I think you'll have to use serverside scripting (php or other)to write the form data to a file.
and I'm pretty sure your "form action=" "" should point to a url or have a mailto:[email protected] in the action attribute.

Jun 26th, 2009, 06:05 PM
The 110mb site says PHP5 is included in those accounts. Check this link (http://www.110mb.com/forum/how-send-text-from-a-form-in-php-t27611.0.html) for help in writing to a file.