Hello,
Ive read some other threads on the gdform.php but none of them were really able to help me out, so Im hoping someone can!
Now, Im not very familiar with php, however I would like to create a form on the site where people can fill it out and it gets sent to my e mail- simple enough I thought, since godaddy provides instructions for their gdform!
Well, I saved my gdform.php in the same folder as my form html which is as follows:
Then, my gdform that godaddy has provided looks like this:Code:<style type="text/css"> <!-- .style1 {font-family: Verdana, Arial, Helvetica, sans-serif} body { background-color: #E6DEEB; } .style2 {font-size: 12px} .style3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } --> </style> <body scroll="yes"> <form action="gdform.php" method="post" enctype="text/plain"> <input type="hidden" name="subject" value="Form Submission" /> <input type="hidden" name="redirect" value="http://www.trinityinvestmentgroup.net/sell/sell/thankyou.html" /> <p><span class="style3">First Name</span><span class="style2">:</span> <input type="text" name="FirstName" /></p> <p><span class="style3">Last Name:</span> <input type="text" name="LastName" /></p> <p><span class="style3">E-Mail:</span> <input type="text" name="email" /></p> <p><span class="style3">Phone:</span> <input type="text" name="phone" /></p> <p><span class="style3">Sales Price:</span> <input type="text" name="sales price" size="20" maxlength="20"></p> <p><span class="style3">Lot Address:</span> <input type="text" name="lot address" size="55" /></p> <p><span class="style3">Lot Dimension:</span> <input type="text" name="lot dimension" /></p> <p><span class="style3">Land Description</span><span class="style2">:</span> <textarea name="land description" cols="40" rows="10"></textarea> <p><span class="style1 style2">Comments</span><span class="style2">:</span> <textarea name="comments" cols="40" rows="10"> </textarea> </p> <input type="submit" name="submit" value="submit"/> </form>
Now, Im having two issues- my thankyou.html redirect page is not coming up- but my index page when I hit Submit.Code:<?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"); $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t; $fp = fopen($file,"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"]."/"); } ?>
AND when I submit something- its not in my inbox. Or in my spam folder. Its like its not working. Does anyone have any ideas? And please as layman as possible! lol.. thanks!




Reply With Quote



Bookmarks