Developer Support »

Write to a CSV file in a password-protected directory over a secure connection  (See more user questions)

Hi.

My pleasure to assist.

The script will not be asked for a password when writing to your password
protected directory as the directory is only protected from external web
access. The script is on your server, so is the file to be written, the
password protection doesn't come into it because you are not accessing it
from the outside, you are accessing the directory from within the server, if
you see what I mean.

Naturally you need to make sure that PHP has permission to write to the
directory, as is normal, and has nothing to do with password protection
(which is to prevent access from the web). You can use CHMOD to change the
permissions if need be (Linux server).

The user of the form will not be asked for a password. You can put the CSV
file anywhere you like on your server, and the script will write to it, no
problem. No problem using the script over a secure connection.

You can see previous questions and answers on my support section here (which
might be useful):

https://formtoemail.com/developersupport/

Any questions, just let me know.

Best wishes.

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Tuesday, July 20, 2010 9:36 AM
Subject: Re[4]: FormToEmail script


> Hi Charles,
>
> Thanks again for your answers. I think I'm about to begin testing.
>
> Can you confirm that I can put the csv file in a password protected
> directory and that this will not interfere with data being written to the
> csv file, i.e., the user of the form will NOT be asked for the password or
> experience any other trouble? (That's a beginnerish question, I guess,
> but like I said, I only have experience with cgi scripts.)
>
> And, there is no problem using the script with a secure form, provided I
> use secure URLs when necessary, correct?
>
> Best regards,
>

>
>> Thank you for the clarification! Yes indeed, the Pro script will write
>> to a
>> CSV file and you can prevent the email getting sent by simply
>> commenting-out
>> the mail function. To do so, locate the line in the script that sends
>> the
>> email, this one:
>>
>> mail($my_email,$subject,$message,$headers);
>>
>> Precede it with two forward slashes, like so:
>>
>> //mail($my_email,$subject,$message,$headers);
>>
>> This will make PHP ignore the mail() command and the email will not get
>> sent.
>>
>> The Pro script will support any encoding. There is an option in the
>> script
>> to set the encoding, and instructions too. This is form the script
>> instructions (between the asterisks):
>>
>> ***
>> /*
>>
>> Character set. Specify a character set (encoding) to be used in the
>> output
>> email and the built-in "thank you" message. Only change this if you need
>> to
>> and you know the correct one to use. Enter the desired value between the
>> quotes. Default: $character_set = "iso-8859-1"; Please also state the
>> character set in the <head> of your form page. So for example if you are
>> using utf-8, the line in your form page would be: <meta
>> http-equiv="Content-Type" content="text/html; charset=utf-8"> and the
>> variable below would be: $character_set = "utf-8";
>>
>> */
>>
>> $character_set = "iso-8859-1";
>> ***
>>
>> You can get the Pro version, here:
>>
>> https://formtoemail.com/formtoemail_pro_version.php
>>
>> Any questions, just let me know.
>>
>> Best wishes.
>>
>> Charles Sweeney
>> https://formtoemail.com
>> The world's easiest feedback script!
>>
>> ----- Original Message -----
>> Sent: Tuesday, July 20, 2010 9:13 AM
>> Subject: Re[2]: FormToEmail script
>>
>>
>> >
>> >> Simple answer, try the free script and find out! I have attached the
>> >> free
>> >> script to this email for you.
>> >
>> > Thanks for your response, I appreciate it.
>> >
>> >> What do you mean by havinbg the data "posted" to a page. You
>> >> want the data to appear on the page permanently?
>> >
>> > I should have said, I wanted the data stored in a csv file on the
>> > server
>> > and NOT emailed to me.
>> >
>> >> The script won't do that.
>> >> You won't get a mail script to do that. The point of a mail script is
>> >> to
>> >> send an email.
>> >
>> > People will post confidential information to my form, so I don't want
>> > the
>> > information to be sent by email where it could be intercepted and
>> > misused.
>> >
>> > I note that you say this on
>> > https://formtoemail.com/formtoemail_pro_version.php?ref=hotscripts
>> >
>> >> CSV file on server. If you enable this, all data from submitted forms
>> >> will be accumulated in a CSV file on your server. You can then
>> >> download
>> >> the file and open it in Excel (for example) and
>> >> search/sort/manipulate/print the data to suit. By default the CSV file
>> >> is
>> >> kept in the same directory/folder as the script but you can specify
>> >> any
>> >> location on your server. The first line of the file is a header row
>> >> made
>> >> up of the field names from your form. The subsequent rows show the
>> >> data
>> >> submitted from your form, one line of data for each form submitted.
>> >
>> > What I would like to do is enable "CSV file on server" but disable the
>> > email sending function. Is this possible? It seems to me this should
>> > be
>> > possible.
>> >
>> >> Any questions, just let me know.
>> >
>> > Can you also tell me if the form script will support Japanese encoded
>> > in
>> > utf-8?
>> >
>> > Thanks again.
>> >
>> > Best regards,
>> >
>> >>
>> >> ----- Original Message -----
>> >> Sent: Tuesday, July 20, 2010 7:53 AM
>> >> Subject: FormToEmail script
>> >>
>> >>
>> >> >
>> >> > Comments: I'm interested in your FormToEmail.com php script, but
>> >> > before
>> >> > I
>> >> > buy it, I have a couple of questions, please:
>> >> >
>> >> > 1.) I have experience working with cgi scripts but no real
>> >> > experience
>> >> > working with php scripts. Will I be able to set up FormToEmail.com
>> >> > by
>> >> > myself if I follow your instructions?
>> >> >
>> >> > 2.) Can I use FormToEmail.com on a secure URL and have the user
>> >> > submitted
>> >> > data posted to a password protected, secure page, and NOT have it
>> >> > emailed
>> >> > to me?
>> >> >
>> >> > Thank you in advance,