Forum Moderators: coopster

Message Too Old, No Replies

gdform.php form on go daddy not working

Any ideas?

         

Lvanhoff

7:43 am on Dec 31, 2004 (gmt 0)

10+ Year Member



Hello,

PHP is greek to me. Go Daddy has a simple gdform.php you put in the action spot for a form in the html, which I did, and set the redirect on submit to a thank you page...that works fine. But the form never shows up in my email box.

Any experience with this or ideas how to fix it?

Thanks!

Salsa

9:39 am on Dec 31, 2004 (gmt 0)

10+ Year Member



Without seeing the code, the first thing I'd think is that gdform.php hasn't been customized to your needs. Look at the code, and near the end there should be a line that looks something like:

mail($to, $subject, $msg, $mailheaders);

The variable, $to, in my example might be called something else, which is fine, but whatever it is, look for it farther up in the script, and make sure it's set to your email address, like:

$to = "you@yourdomain.com";

I hope this helps.

hooks

11:59 pm on Jan 10, 2005 (gmt 0)



Here's the code. I can't get it to work either.

<?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("ssfm/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!= "")

{
header("Location: [".$_SERVER["HTTP_HOST"]."...]

}
else
{
header("Location: [".$_SERVER["HTTP_HOST"]."...]
}

?>