DW Form Code Question
See bottom for question
Code for contact.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<form>
<p>
<input name="textfield" type="text" id="textfield" placeholder="Name:">
</p>
<p>
<input name="email" type="email" id="email" placeholder="Email:">
</p>
<p>
<textarea name="textarea" id="textarea" placeholder="Comment"></textarea>
</p>
<p>
<input name="submit" type="submit" id="submit" formaction="gdform.php" formenctype="text/plain" formmethod="POST" value="Submit">
</p>
</form>
</body>
</html>
Godaddy Server:
and
Code for gdform.php
<?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"]."/");
}
?>
================================================
When I test the form it returns to my home page, but does not receive at [email removed by moderator to save you from spam.] in my gmail account.
This is the address that I used in the Godaddy forms panel.
Need help...
