Results 1 to 8 of 8

Thread: Form Help

  1. #1
    Join Date
    Aug 2005
    Location
    Habburgers.
    Posts
    234
    Tokens
    0

    Default Form Help

    All I really want is the code of a working SUBMIT button that submit's to a email address.
    If anyone can help or get a code that works a HC is on their way to them!
    I'll be able to do all the input and radio buttons etc.. But I can't get a working SUBMIT button.

    Here's a basic code if it's helpful?

    <form>
    Forum Name:
    <input type="text" name="firstname">
    <input type="radio" name="***" value="male"> Male
    <br>
    <input type="radio" name="***" value="female"> Female
    <form action=mailto:"**EMAIL**" subject="Quiz Submission" method="post" enctype="text/plain">
    <table><tr><td>
    </td></tr>
    <tr><td align=center>
    <INPUT TYPE="submit" value="Submit" style="color: #ffffff; background-color: #000000">
    </td></tr></table>
    </FORM>
    )

    Quote Originally Posted by Woodrally
    I'm leaving LovePanda competitions!
    Quote Originally Posted by thechoo
    Good for you? o.0

  2. #2
    Join Date
    Aug 2005
    Location
    Spain
    Posts
    1,367
    Tokens
    0

    Latest Awards:

    Default

    <input type="SUBMIT" name="Submit" value="ok">
    </form>

  3. #3
    Join Date
    Aug 2005
    Location
    Habburgers.
    Posts
    234
    Tokens
    0

    Default

    that doesnt send it anywhere though
    )

    Quote Originally Posted by Woodrally
    I'm leaving LovePanda competitions!
    Quote Originally Posted by thechoo
    Good for you? o.0

  4. #4
    Join Date
    Aug 2005
    Location
    Spain
    Posts
    1,367
    Tokens
    0

    Latest Awards:

    Default

    <script language="php">
    $email = $HTTP_POST_VARS[email];
    $mailto = "email@address";
    $mailsubj = "Form submission";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
    if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
    </script>

  5. #5
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    your form tag, lacks the action="" attribute wich is needed so the form knows what to do with the inputs, once you click the submit button "/

    plus if you lack php u can use my free form handler service
    http://thybag.co.uk/index.php?p=formH

  6. #6
    Join Date
    Aug 2005
    Location
    Habburgers.
    Posts
    234
    Tokens
    0

    Default

    Oooh k, and I noticed the "" after I posted it. The above code makes no sense at all.
    )

    Quote Originally Posted by Woodrally
    I'm leaving LovePanda competitions!
    Quote Originally Posted by thechoo
    Good for you? o.0

  7. #7
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    thus bit
    <form action=mailto:"**EMAIL**" subject="Quiz Submission" method="post" enctype="text/plain">
    should be at the top of the form where <form> is, and mailto: dosnt work in most browsers so u would need a form handler
    http://thybag.co.uk/index.php?p=formH *advertises* tis free

  8. #8
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    I recommend using Mentors form service as he's an expert in that sort of stuff, also read his tutorial.

    - Dan

Posting Permissions

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