Jump to content

cURL to post a form to both a google docs spreadsheet and a formmail script


leefentress

Recommended Posts

I've got this rsvp kind of form currently set up to post to a google docs spreadsheet (i followed a tutorial to create a custom form that would post to google docs spreadsheets), but my boss wants people to get an auto-response email confirming their RSVP, so I need the information to be posted to the spreadsheet and to a formmail script that with auto-respond to their email address. I'm using this formmail script from tectite.com. First, I don't know how to use cURL, and second the tectite formmail script utilizes captcha for the auto-response feature--you have to fill it out if you want the response or leave it blank if you don't. Also, the google docs input field names are like, well see here:

<input type="text" name="entry.0.single" value="" class="ss-q-short" id="entry_0" />

But for the formmail autoresponse, I would need to have more descriptive names.

 

Anybody ever do anything like this? Any help would be greatly aprreciated ;)

Thanks

Heres a mail script i wrote for our error report form.

 

$director = $_POST['director'];
$room = $_POST['room'];
$class = $_POST['class'];
$description = $_POST['description'];

$to = "[email protected]";
$subject = "Error Log: ".$room.".";
$msg= "From: ".$director."\n"."\n"."Room: ".$room."\n"."\n"."Class: ".$class."\n"."\n"."Description:"."\n".$description;
$headers = "From: [email protected]\r\nReply-To: [email protected]";

mail("$to", "$subject", "$msg", "$headers") or die("Error sending mail in error_log.php @ line 97.");
echo "Error logged. Thank You. Please return <a href='index.php'>Home</a>";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.