A friend wanted to put a feedback form on his site, and I did the best I could. Just about everything works. People are able to input their data and then summit it, but when it comes to the redirect after hitting the summit button, it doesnât load the way I would prefer.
I have a [thank you] page, but after hitting summit the index loads in the Iframeâ¦. Can anyone take a look at the coding and maybe point me in the right direction? PM me if you want to take a look at the feedback page, i will then supply the url
I have a [thank you] page, but after hitting summit the index loads in the Iframeâ¦. Can anyone take a look at the coding and maybe point me in the right direction? PM me if you want to take a look at the feedback page, i will then supply the url
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");
$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 == "redirect") { $landing_page = $val;}
}
fclose($fp);
if ($landing_page != "thanks.htm"){
header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
} else {
header("Location: http://".$_SERVER["HTTP_HOST"]."/");
}
?>