I am looking to make an all purpose mail handler so you just have to make th e form and send it to the mailform.php file
I don’t know enough to handle the entire process, far from it.
This is what I was thinking to start.
[code=php]<?php
$sendto = “[email protected]”;
$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”);
// This is the part I don’t know how to write,
// I want you to put any fields in the form and this section
// will take all those fields and turn them into strings
// and then submit the form as a get or a post to the address
// above in the $sendto
while (list ($key, $val) = each ($query_vars)) {
// something to handle all the form values and names in to $key or something;
// then continue with
if ($key == “redirect”) { $landing_page = $val;}
}
if ($landing_page != “”){
header(“Location: http://”.$_SERVER[“HTTP_HOST”].”/$landing_page”);
} else {
header(“Location: http://”.$_SERVER[“HTTP_HOST”].”/”);
}
?>