Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member Immortal_Dead's Avatar
    Join Date
    Nov 2006
    Posts
    14
    Member #
    14313
    Hey guys, I am trying to create a form, everything apears to be functioning apart from the results being sent to my email address, I do not receive anything even after a 'sucessfull' submission. Any help would be hugely apretuaited, here is my code:

    Code:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <script language="javascript">
    function jump()
    {
    
       window.location = 'http://www.chemicaldesigns.org/thankyouforsubmiting.html';
    }
    
    </script>
    <style type="text/css">
    <!--
    body,td,th {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 10px;
    }
    -->
    </style></head>
    
    <body>
    <form name="form1" action="mailto:ngethin@gmail.com?subject=Someone wants a printing quote." method="post" enctype="text/plain">
    <table><tr><td>
        <td colspan="3"><span class="style2">General Requirements</span></td>
    </tr>
    <tr>
        <td><p>Artwork</p></td>
        <td align="right"><select name="artwork">
            <option value="supplied">I will supply my own artwork</option>
            <option value="inhouse">I would like you to design my artwork</option>        
        </select></td>
        <td rowspan="5" valign="top"><br>
            <a href="http://www.facemediagroup.co.uk/?page="></a>    </td>
    </tr>
    <tr>
                        <td><p>Short name for future reference</p></td>
                        <td align="right"><input name="reference" maxlength="10"></td>
                    
        </tr>
        <tr>
            <td colspan="2"><hr size="1"></td>
        </tr>
    
        <tr><td><span class="style2">Sizes and Quantities</span></td></tr>         <tr>
                            <td><p> Number Of Sets</p></td>
                    <td align="right"><select name="number_of_sets" onchange="Show_Other('number_of_sets', '9')"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">10</option><option value="7">15</option><option value="8">20</option><option value="9">Other</option></select><br><table><tbody><tr id="number_of_sets-9" name="number_of_sets-9" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="number_of_sets-other"></p></td></tr></tbody></table></td>                                            
                </tr>                        
                        
    
            <tr>
                            <td><p> Quantity</p></td>
                    <td align="right"><select name="quantity" onchange="Show_Other('quantity', '40')"><option value="4">100</option><option value="5">150</option><option value="6">200</option><option value="7">250</option><option value="8">300</option><option value="9">400</option><option value="10">500</option><option value="11">600</option><option value="12">700</option><option value="13">800</option><option value="14">900</option><option value="15">1000</option><option value="16">1500</option><option value="17">2000</option><option value="18">2500</option><option value="19">5000</option><option value="20">10000</option><option value="21">15000</option><option value="22">20000</option><option value="23">25000</option><option value="24">30000</option><option value="25">35000</option><option value="26">40000</option><option value="27">45000</option><option value="28">50000</option><option value="29">55000</option><option value="30">60000</option><option value="31">65000</option><option value="32">70000</option><option value="33">75000</option><option value="34">80000</option><option value="35">85000</option><option value="36">90000</option><option value="37">95000</option><option value="38">100000</option><option value="40">Other</option></select><br><table><tbody><tr id="quantity-40" name="quantity-40" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="quantity-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
            <tr>
                            <td><p> Finished Size</p></td>
                    <td align="right"><select name="finished_size" onchange="Show_Other('finished_size', '36')"><option value="16">Business Card (88mm x 55mm)</option><option value="36">Other</option><option value="366">Business Card (85mm X 55mm)</option></select><br><table><tbody><tr id="finished_size-36" name="finished_size-36" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="finished_size-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
        <tr><td colspan="2"><hr size="1"></td></tr>    
        <tr><td><span class="style2">Paper Specification</span></td></tr>         <tr>
                            <td><p> Paper Type</p></td>
                    <td align="right"><select name="paper_type" onchange="Show_Other('paper_type', '17')"><option value="1">Standard Matt</option><option value="2">Standard Gloss</option><option value="3">Standard Silk</option><option value="4">Standard White Uncoated</option><option value="5">Premium Matt</option><option value="6">Premium Gloss</option><option value="7">Premium Silk</option><option value="8">Premium White Uncoated</option><option value="17">Other</option></select><br><table><tbody><tr id="paper_type-17" name="paper_type-17" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="paper_type-other"></p></td></tr></tbody></table></td>                                            
                </tr>                        
                        
    
            <tr>
                            <td><p> Paper Weight</p></td>
                    <td align="right"><select name="paper_weight" onchange="Show_Other('paper_weight', '17')"><option value="13">300</option><option value="14">325</option><option value="15">350</option><option value="16">400</option><option value="17">Other</option></select><br><table><tbody><tr id="paper_weight-17" name="paper_weight-17" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="paper_weight-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
        <tr><td colspan="2"><hr size="1"></td></tr>    
        <tr><td><span class="style2">Colours</span></td></tr>         <tr>
                            <td><p> Double Sided</p></td>
                    <td align="right"><select name="double_sided" onchange="Process_double_sided('2', 'double_sided', '0')"><option value="1">Yes
    </option><option value="2">No</option></select><br><table><tbody><tr id="double_sided-0" name="double_sided-0" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="double_sided-other"></p></td></tr></tbody></table></td>                                            
                </tr>                        
                        
    
            <tr>
                            <td><p> Colours Throughout</p></td>
                    <td align="right"><select name="colours_throughout" onchange="Process_colours_throughout('1', 'colours_throughout', '10')"><option value="1">None</option><option value="2">1 pantone
    </option><option value="3">2 pantone
    </option><option value="4">3 pantone
    </option><option value="5">4 pantone
    </option><option value="6">Black Only
    </option><option value="8">Full Colour(CMYK)
    </option><option value="9">4 process + 1 pantone
    </option><option value="10">Other</option></select><br><table><tbody><tr id="colours_throughout-10" name="colours_throughout-10" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="colours_throughout-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
            <tr>
            </tr>                        
    
                <tr name="colour_front_row" id="colour_front_row" style="visibility: visible;">        
                            <td><p> Colour Front</p></td>
                    <td align="right"><select name="colour_front" onchange="Process_colour_front('', 'colour_front', '10')"><option value="1">None
    </option><option value="2">1 pantone
    </option><option value="3">2 pantone
    </option><option value="4">3 pantone
    </option><option value="5">4 pantone
    </option><option value="6">Black Only
    </option><option value="8">Full Colour(CMYK)
    </option><option value="9">4 process + 1 pantone
    </option><option value="10">Other</option></select><br><table><tbody><tr id="colour_front-10" name="colour_front-10" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="colour_front-other"></p></td></tr></tbody></table></td>                                            
                </tr>                        
                        
    
                <tr name="colour_rear_row" id="colour_rear_row" style="visibility: visible;">        
                            <td><p> Colour Rear</p></td>
                    <td align="right"><select name="colour_rear" onchange="Process_colour_rear('', 'colour_rear', '10')"><option value="1">None
    </option><option value="2">1 pantone
    </option><option value="3">2 pantone
    </option><option value="4">3 pantone
    </option><option value="5">4 pantone
    </option><option value="6">Black Only
    </option><option value="8">Full Colour(CMYK)
    </option><option value="9">4 process + 1 pantone
    </option><option value="10">Other</option></select><br><table><tbody><tr id="colour_rear-10" name="colour_rear-10" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="colour_rear-other"></p></td></tr></tbody></table></td>                                            
                </tr>                        
                        
    
        <tr><td colspan="2"><hr size="1"></td></tr>    
        <tr><td><span class="style2">Finishing</span></td></tr>         <tr>
                            <td><p> Embossing</p></td>
                    <td align="right"><select name="embossing" onchange="Show_Other('embossing', '0')"><option value="1">No
    </option><option value="2">Yes</option></select><br><table><tbody><tr id="embossing-0" name="embossing-0" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="embossing-other"></p></td></tr></tbody></table></td>                                            
                </tr>                        
                        
    
            <tr>
                            <td><p> Foil Blocking</p></td>
                    <td align="right"><select name="foil_blocking" onchange="Show_Other('foil_blocking', '0')"><option value="1">No
    </option><option value="2">Yes</option></select><br><table><tbody><tr id="foil_blocking-0" name="foil_blocking-0" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="foil_blocking-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
            <tr>
                            <td><p> Lamination</p></td>
                    <td align="right"><select name="lamination" onchange="Show_Other('lamination', '10')"><option value="1">None</option><option value="2">One Side Matt</option><option value="3">Double Side Matt</option><option value="4">One Side Gloss</option><option value="5">Double Side Gloss</option><option value="10">Other</option></select><br><table><tbody><tr id="lamination-10" name="lamination-10" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="lamination-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
            <tr>
                            <td><p> Uv Varnish</p></td>
                    <td align="right"><select name="uv_varnish" onchange="Show_Other('uv_varnish', '0')"><option value="1">None
    </option><option value="2">One Side Gloss UV
    </option><option value="3">Double Side Gloss  UV
    </option></select><br><table><tbody><tr id="uv_varnish-0" name="uv_varnish-0" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="uv_varnish-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
            <tr>
                            <td><p> Seal</p></td>
                    <td align="right"><select name="seal" onchange="Show_Other('seal', '0')"><option value="10">Double Side Silk Machine Seal</option></select><br><table><tbody><tr id="seal-0" name="seal-0" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="seal-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
            <tr>
                            <td><p> Spot Uv</p></td>
                    <td align="right"><select name="spot_uv" onchange="Process_spot_uv('1', 'spot_uv', '6')"><option value="1">None</option><option value="2">Front Cover</option><option value="3">Back Cover</option><option value="4">Front and Back Cover</option><option value="5">Throughout</option><option value="6">Other</option></select><br><table><tbody><tr id="spot_uv-6" name="spot_uv-6" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="spot_uv-other"></p></td></tr></tbody></table></td>                                            
          </tr>                        
                        
    
                <tr name="spot_uv_coverage_row" id="spot_uv_coverage_row" style="visibility: hidden; display: none;">        
                            <td><p> Spot Uv Coverage</p></td>
                    <td align="right"><select name="spot_uv_coverage" onchange="Show_Other('spot_uv_coverage', '0')"><option value="1">None</option><option value="2">Up to 10%
    </option><option value="3">Up to 20%
    </option><option value="4">Up to 30%
    </option><option value="5">Up to 40%
    </option><option value="6">Up to 50%
    </option><option value="7">Up to 60%
    </option><option value="8">Up to 70%
    </option><option value="9">Up to 80%
    </option><option value="10">Up to 90%
    </option></select><br><table><tbody><tr id="spot_uv_coverage-0" name="spot_uv_coverage-0" style="visibility: hidden; display: none;"><td><p>Please Specify <input name="spot_uv_coverage-other"></p></td></tr></tbody></table></td>                                            
                </tr>                        
                        
    
        <tr><td colspan="2"><hr size="1"></td></tr>    
    <tr>
        <td colspan="2" align="right"><a href="javascript:document.products.submit()">
          <input type="submit" onClick="jump()"name="Submit" value="Submit"> 
        </a></td>
    </tr>
    </tbody></table>
    
    <br><br>
    </form>
    <p>&nbsp;</p>
    </body>
    </html>
    Thanks! Nick

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    You need to use a server-side script to send emails from your website.

    This line:
    <form name="form1" action="mailto:ngethin@gmail.com?subject=Someone

    needs to point to either a PHP or Perl script.

    If your webhost allows PHP scripting and PHP sendmail,
    it is easy to do. Let us know if your webhost allows that.

    Once we know you're set to use PHP, we can provide you
    with the script that you will upload into the same directory
    as your HTML form page.

    And also give us a link to the real form page so we can see it.

    EDIT:
    I'm trying to open this page (and others): www.chemicaldesigns.org
    I get a bunch of Javascript errors (IE6.0)


    .


  4. #3
    Junior Member Immortal_Dead's Avatar
    Join Date
    Nov 2006
    Posts
    14
    Member #
    14313
    Hey man, thanks for posting. Yep my host allows PHP, but I dont currently have the form uploaded, do you really need it uploaded?

    thanks for your help

    Nick.

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    I'm not sure about what the Javascript parts are doing ...

    That's why I wanted to see the form online.

    Anyhow, the <form ...> line will need to be:

    <form name="form1" action="form123.php" method="post">

    Then, the PHP script below will be saved as: "form123.php" and
    uploaded into the same directory as your HTML form page.

    You will need to add every form variable into the script (see script comments).
    And change the other parts of the script as needed.

    Form validation should be done using Javascripting on your form page.
    Again, I don't know what your actual page looks like.

    PHP Code:
    <?
    $recipient 
    "ngethin@gmail.com";

    //Enter the email subject ... don't let the user enter their own subject
    $subject "Chemical Designs - Website";

    //Where you want the script to go after emailing
    $redirect "http://www.chemicaldesigns.org/thankyouforsubmiting.html";

    // This is where you define all of the form variables
    // These are case-sensitive  ['variable']
    // Finish adding all of them exactly as defined on your form. 
    $sender $_POST['email'];
    $username $_POST['name'];
    $address $_POST['Address'];
    $city $_POST['City'];
    $fmessage $_POST['Comments'];

    $toaddr "$recipient";
    $subject "$subject";
    $senddate = (date("d M Y"));

    // This is the actual message part that you will get in the email
    // Lay it out with the variables and text you want
    // use NO quotes

    $message "
    Chemical Designs Website Contact
    Online Form: 
    $senddate
    ---------------------------------------------------
    Name:  
    $username
    Address:
    $address
    $city $state
    Phone: 
    $phone
    Email: 
    $sender
    ---------------------------------------------------
    $fmessage
    ---------------------------------------------------
    "
    ;

    $extraheaders "From: $sender\nReply-To: $sender\n\n";

    if (! 
    mail($toaddr$subject$message$extraheaders))
      echo 
    "Mail did not send for some reason.";

    header("Location: ".$redirect);
    ?>


  6. #5
    Junior Member Immortal_Dead's Avatar
    Join Date
    Nov 2006
    Posts
    14
    Member #
    14313
    Fantasticmlseim thanks a lot! the javascript was redirecting the user after they had submitted the info but now I see that the PHP script can actually do that. I think this will work a treat, I will get back to you.

    Thanks!

    Nick

  7. #6
    Junior Member Immortal_Dead's Avatar
    Join Date
    Nov 2006
    Posts
    14
    Member #
    14313
    ok I gave it a shot and seems to be working well, but I am a little bit stuck when editing this PHP for my form requirements, do you think you could help me out? I uploaded my form to here:

    http://www.chemicaldesigns.org/test_...uote_form.html

    thanks again.

    Nick

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    On your form, where you have names defined like:

    name="number_of_sets"
    name="quantity"
    name="finished_size-36"
    name="paper_type-17"
    .
    .
    .
    etc.


    These are unique variable names you created on your HTML form.

    Now, within the PHP script, you need to define these so that
    the form variables get passed to the PHP script.

    $number_of_sets = $_POST['number_of_sets'];
    $quantity = $_POST['quantity'];
    $finished_size-36 = $_POST['finished_size-36'];
    $paper_type-17 = $_POST['paper_type-17'];
    .
    .
    .
    etc.


    Then, in the $message part, you decide what to send in the email.
    The text, the variables ... however you want it to look.

    EDIT:
    You can't use dashes in your variable names ...
    Change those dashes to underscores.
    Change them in both your HTML form and the PHP script ...

    $paper_type_17 = $_POST['paper_type_17'];


    .


  9. #8
    Junior Member Immortal_Dead's Avatar
    Join Date
    Nov 2006
    Posts
    14
    Member #
    14313
    Ok thanks man, I will give it a shot and get back to you.peace.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:58 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com