Jump to content

comment form doesnt work


Macsure
Go to solution Solved by afallingpanda,

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.