Mailing List Form - Sent to Email<

liunx

Guest
My server gdform.php is set up correctly
(as far as I can see; its a generic script provided by my server)


this is my form code for submitting an email address:


<form action="gdform.php" method="post">
<input type="hidden" name="subject" value="Mailing List Submission">
<input type="hidden" name="redirect" value="frameset.html">
<input name="email">
<input type="submit" value="Submit">
</form>

When submit is clicked the viewre is taken to the index and nothing is sent. why?probably something wrong with the script you are using

show the PHP code and maybe someone will be able to help youthis is the php script:

<?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");
$fp = fopen("../data/gdform_$t","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 == "[email protected]") { $landing_page = $val;}
}
fclose($fp);
if ($landing_page != ""){
header("Location: <!-- m --><a class="postlink" href="http://">http://</a><!-- m -->".$_SERVER["HTTP_HOST"]."/$landing_page");
} else {
header("Location: <!-- m --><a class="postlink" href="http://">http://</a><!-- m -->".$_SERVER["HTTP_HOST"]."/");
}


?>

i just got this from my web provider, i don't know how to write this kind of script.Anyone see anything wrong with the code or the script? Cause I've given up.Hi, I have another script which does the same thing, I don;t have much time to explain, so read the readme file, it contains all you need to know.

The script is in the attachementThank You

I haven't gotten it to work yet, but I'll be working on it.there is nothing in gdform.php that will send an emial. all it does it write to a file on the serverWell that clears things up. Thanks.
 
Back
Top