Hello. With my previous host provider, I'd used a CGI script. This one uses PHP, and they provide the PHP script. I've made all the necessary changes to my form to accomodate their script, however, I have one problem:
Utilizing their script (below), how do I direct the emails to show the email address of the sender? IOW, one of the fields on the form is the email field. On my previous server, it was setup to show the email address field, when I received the email - it would appear to "come" from that person's email address. This was very useful to us for a few reasons.
What do I need to add to my form, or to this script, in order to make it arrive as noted above?
<?php
$request_method = $_SERVER["REQUEST_METHOD"];
if($request_method == "GET"){
$query_vars = $_GET;
} elseif ($request_method == "POST"){
$query_vars = $_POST;
}
reset($query_vars);
$t = date("U");
$file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
$fp = fopen($file,"w");
while (list ($key, $val) = each ($query_vars)) {
fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
fputs($fp,"$val\n");
fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
if ($key == "redirect") { $landing_page = $val;}
}
fclose($fp);
if ($landing_page != ""){
header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
} else {
header("Location: http://".$_SERVER["HTTP_HOST"]."/");
}
?>
Thanks!



Reply With Quote

Bookmarks