Macsure Posted November 16, 2013 Share Posted November 16, 2013 Hi All, I am using a html5/css3 responsive web template. I am up to the comments form part. I have tried a few things to get it wokring but I have failed, Hoping some who is a lot smarter then I can help me out. <form action="/gdform.php" method="post"> <div class="row half"> <div class="6u"> <input name="name" placeholder="Name" type="text" class="text" /> </div> <div class="6u"> <input name="email" placeholder="Email" type="text" class="text" /> </div> </div> <div class="row half"> <div class="12u"> <textarea name="message" placeholder="Message"></textarea> </div> </div> <div class="row half"> <div class="12u"> <a href="" class="button button-icon icon icon-envelope">Send Message</a> </div> </div> </form> that is the html side and I am using a gdform. which looks like this <?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"]."/"); } ?> My understand is if I have done it correctly. I should receive a email at GD web hosting email which I have set up. Quote Link to comment https://forums.phpfreaks.com/topic/283961-comment-form-doesnt-work/ Share on other sites More sharing options...
Macsure Posted November 18, 2013 Author Share Posted November 18, 2013 Is this Too hard to fix? Have I posted in the section. Please someone I am desperate of help Quote Link to comment https://forums.phpfreaks.com/topic/283961-comment-form-doesnt-work/#findComment-1458789 Share on other sites More sharing options...
mac_gyver Posted November 18, 2013 Share Posted November 18, 2013 you may have seen this mentioned before, but just telling a help forum that something doesn't work is pointless. we are not standing right next to you and don't know what your code did do that leads you to believe it didn't work. you must communicate exactly what it do and at what point it did it. what exactly did you do and what did you see in front of you after you did it? Quote Link to comment https://forums.phpfreaks.com/topic/283961-comment-form-doesnt-work/#findComment-1458792 Share on other sites More sharing options...
Macsure Posted November 18, 2013 Author Share Posted November 18, 2013 Hmm ok I thought I had. I will try again. Re : working with the code above. Once u fill the form out and hits submit. I don't receive an email. It takes you a designated page that I chose just for testing. So that part works. However I don't receive the email that comes from the comment form. Hopefully this fill in the gaps to make it easier for someone to help me Quote Link to comment https://forums.phpfreaks.com/topic/283961-comment-form-doesnt-work/#findComment-1458909 Share on other sites More sharing options...
Solution afallingpanda Posted November 19, 2013 Solution Share Posted November 19, 2013 you need to build an emailing script. Quote Link to comment https://forums.phpfreaks.com/topic/283961-comment-form-doesnt-work/#findComment-1458968 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.