General discussion
Thread display: Collapse - |
All Comments
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
html form to web secure excel document
I have a form that when submitted sends the results to an excel csv spreadsheet. I need to make the spreadsheet secure. I have tried locking it but that doesn't work on csv.
I have used FrontPage in the past and was able to put the csv in an _private folder.
Any ideas on how I can make this happen?
The following is my php page.
$firstname = $_POST['FirstName'];
$lastname = $_POST['LastName'];
$email = $_POST['email'];
$address = $_POST['Address'];
$city = $_POST['City'];
$state = $_POST['State'];
$phone = $_POST['Phone'];
$zip = $_POST['Zip'];
$military = $_POST['Military'];
//now we open the file using the a flag, this will create the file if
//it does not exist, and puts the pointer(where it starts writing) at the
//end of the file
$filename = "formresults.csv";
$handle = fopen($filename, 'a');
//now we prepare our string to be added:
$string_to_add = "$firstname,$lastname,$email,$address,$city,$state, $phone,$zip,$military" . "\n";
fwrite($handle, $string_to_add);
//now close the file
fclose($handle);