Thread View: adobe.golive.macintosh
2 messages
2 total messages
Started by Cinda_Baxter
Wed, 01 Apr 2009 23:59
Need data from web form to drop into spreadsheet
Author: Cinda_Baxter
Date: Wed, 01 Apr 2009 23:59
Date: Wed, 01 Apr 2009 23:59
11 lines
1670 bytes
1670 bytes
Help. I�ve built a site in GoLive 8.0.1 that includes a couple of web forms. My host company uses FormMail, which has worked well to forward form data to me via email. I then take that data from Mail and manually enter it into FileMaker Pro. Given the amount of traffic the site is getting, I can�t keep up with manual data entry and need a spreadsheet solution. Translated, I need the web form data to drop into a format that can be imported and/or read by Excel. FormMail doesn�t do this, so no luck there. I realize this may well be a third party software issue (something that needs to be installed on the server), but am clueless about where else to turn. A 45-minute exploration on Google turned up a zillion ways to convert a spreadsheet INTO a web form, but nothing about how to get web form data to move INTO a spreadsheet. Is there a plugin or anything that helps? Any idea what third party software would work? Don�t want to try something like Google docs since the form needs to remain inside the site to keep a consistent professional look across the board. Thanks in advance!
Re: Need data from web form to drop into spreadsheet
Author: Jim_Jordan
Date: Thu, 02 Apr 2009 13:04
Date: Thu, 02 Apr 2009 13:04
24 lines
1563 bytes
1563 bytes
If you have PHP enabled on your server, you could easily write to a CSV file. Then you could access that CSV file from <http://www.yourdomain.com/log.csv>
Here's an example form processing script:
<?php
// DETERMINE THE DATE FOR A TIMESTAMP
$date = date("ymd-Hi");
// CHOOSE THE FILE TO WRITE TO
$LogFile = "log.csv";
// OPEN THE FILE
$FilePointer = fopen ($LogFile, "a");
// WRITE TO THE FILE
fwrite ($FilePointer, "\"$date\",\"$_SERVER[REMOTE_ADDR]\",\"$_POST[firstname]\",\"$_POST[lastname]\",\"$_POST[email]\"\n");
// CLOSE THE FILE
fclose ($FilePointer);
?>
This script assumes you are gathering a first name, last name and email address from a form submitted by the POST method. Tweak as needed with additional fields. It adds two optional columns to identify the date/time the form was submitted and from which IP address. You will need to create an empty/blank text file, name it log.csv, and upload to your server.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads