Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A little GoDaddy gdform help?

    Hey all! Just joined because I'm in a pinch with GoDaddy's silly gdform... I've got zero background with PHP and don't really have the time or resources to figure it all out right now......... so I figured I'd ask those who know! I've already messed around with it for hours in the actual php file and in the .fla and about all I've been able to do is either make it work on a very fundamental level or break it! I can see most everything that probably needs to change, but i don't know enough about any of it to make the changes correctly.

    It's a simple submittal form in Flash (Name, Phone, Email, Message.)

    The code from the .FLA is here:

    on (release) {
    for (i=1; i<_parent.fields_descriptions.length; i++) {
    if (_parent[_parent.fields_descriptions[i][1]]!=_parent.fields_descriptions[i][2]) {
    this[_parent.fields_descriptions[i][1]]=_parent[_parent.fields_descriptions[i][1]]+"&777&"+_parent.fields_descriptions[i][2];
    }
    _parent.reset_txt(_parent["t"+i], _parent.fields_descriptions[i][1], _parent.fields_descriptions[i][2]);
    }

    this.recipient=_parent.rec;
    i="undefined";
    getURL("contact."+_parent.serv, "_blank", "POST");


    *************************

    The code from GoDaddy's gdform is here:

    <?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"]."/");
    }


    ?>


    ***************************************

    All of that shown.... the form WORKS, but it comes thru to my email as this:


    i: undefined
    message: test&777&your message:
    recipient: test@test.com
    telephone: test&777&your phone:
    your_email: test&777&your e-mail:
    your_name: test&777&your name:


    I'm not sure where the recipient field is even coming from. I haven't found it referenced any where.

    When you click the Submit button, the form should clear and it would ideally link to another small 'Thank You' html page that would pop up. I'm not sure of a better way to acknowledge the receipt. At least I could format an html page to look similar to the flash site.

    I can see where the i: undefined and &777& are coming from, but can anyone help me get my code together so that it submits the form more legibly and fixes the pop-up issue? By default the GoDaddy gdform just pops up another window that loads the homepage (horrible).

    This is just about the last thing I have to do for my site and I'm anxious to get it finished. Any help is GREATLY apprec'd!

    Thanks!

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,511
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    The recipient is known because of your GoDaddy Account.
    GoDaddy sends the email to the one specified in your GoDaddy account.

    That's why GoDaddy requires you to use their GDFORM system.

    ===========

    gdform is expecting certain variables to be defined.

    In a normal HTML page, the form has variables defined
    on each line, where people enter the data ... sort of like this ...

    Enter Email Address: <input type="text" name="email" value=""><br>
    Enter Your name: <input type="text" name="name" value=""><br>

    But with Flash, I don't think it's defining the variable names that
    gdform.php is looking for. I'm no Flash expert, so I can't help you there.

    ===========

    1) use GoDaddy's examples to create a contact form using traditional HTML.
    2) get that to work the way you want.
    3) once you have something that works using gdform.php, you're almost there.
    4) see if anyone else that knows Flash can help you with the Flash part.
    I'm guessing it's been done before, but you'll have to search for it.

    EDIT:
    This might be helpful. Someone else has the same problem and
    there's a thing at the very end of this post that might be helpful.
    If you could match the variable names from your Flash with the
    one's that gdform is expecting:
    http://codingforums.com/sitemap/t-49998.html

    Also, read a few of these ... other people have the same issue:
    http://www.google.com/search?q=godad...sh&btnG=Search


    .
    Last edited by mlseim; 01-06-2008 at 09:06 PM.

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks man.

    I actually saw that first thread before I posted and most all of the best links in the Google search are already purple :-D I've been searching quite a bit already.

    The recipient I mentioned is the one actually listed in the output as recipient: test@test.com... that email is used no where as far as I can see.

    The biggest issue I really need to get fixed is the whole 2nd window that pops up and loads the homepage when the form is submitted... if we forget about the flash part, do you think you could help me resolve that?

    Thanks again!

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,511
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    I have a little trouble understanding ... but I think you're now talking about this part?

    if ($landing_page != ""){
    header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
    } else {
    header("Location: http://".$_SERVER["HTTP_HOST"]."/");
    }

    It's looking for the variable $landing_page to be defined with some URL.

    You could just replace the whole blue part with this:

    header("Location: http://www.yoursite.com/thankyou.html");

    create a page called "thankyou.html" and it would go to that when it
    was finished sending the email.

    If you're not talking about that ... explain in a different way.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •