General discussion

Locked

html form to web secure excel document

By cjozwiak ·
I am using dreamweaver and php.
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);

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Software Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums