|
Does anyone have experience with GoDaddy's gdform.php form mailer script?
I uploaded a form in an HTML page using the settings that GoDaddy recommends including:
1. <form action="gdform.php" method="post">
2. <input type="hidden" name="subject" value="Form Submission">
3. <input type="hidden" name="redirect" value="thankyou.htm">
4. Creating a "thankyou.htm" page
5. Adding the email address in their Settings panel (send forms to...)
6. Verifying that the gdform.php scripts resides on ther server
The problem is that the redirect works, but the information from the form is not emailed to me. I also tried uploading the form in a new PHP page but with no results.
The only way I can get the form info. emailed to me is if I use the "mailto:..." command as the Action. This doesn't look as professional however, and doesn't allow me to redirect them to a "thankyou" page.
Any ideas?? I added the code below.
Thanks,
Wilbury
here is the form script:
<form action="gdform.php" method="post" name="" id="" onSubmit="MM_validateForm('name','','R');MM_valida teForm('email','','RisEmail');return document.MM_returnValue">
<input type="hidden" name="subject" value="Form Submission">
<input type="hidden" name="redirect" value="thankyou.htm">
<p class="style63"> </p>
<table width="400" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td width="120"><span class="style45 style13">Name:</span></td>
<td width="266"><input name="name" type="text" id="name" onBlur="MM_validateForm('name','','R');return document.MM_returnValue" size="30"></td>
</tr>
<tr>
<td><span class="style45 style13">Email:</span></td>
<td><input name="email" type="text" id="email" onBlur="MM_validateForm('email','','RisEmail');ret urn document.MM_returnValue" size="30"></td>
</tr>
<tr>
<td><span class="style45 style13">How did you hear about the website: </span></td>
<td><p class="style45">
<label>
<input type="radio" name="RadioGroup1" value="magazine">
<span class="style13">Magazine article</span></label>
<br>
<label>
<input type="radio" name="RadioGroup1" value="otherwebsite">
<span class="style13">Other website</span></label>
<br>
<label>
<input type="radio" name="RadioGroup1" value="searchengine">
<span class="style13">Search engine </span></label>
<span class="style13"><br>
<label>(e.g. Google, Yahooo, MSN)</label>
</span></p>
</td>
</tr>
<tr>
<td><span class="style45 style13">Comments:</span></td>
<td><textarea name="comments" id="comments"></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset"></td>
</tr>
</table>
<p> </p>
</form>
here is the gdform.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("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: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
}
else
{
header("Location: http://".$_SERVER["HTTP_HOST"]."/");
}
?>
|