The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

dreamweaver+forms+email submit drives me CRAZY

Evil GummyEvil Gummy Registered User regular
edited July 2010 in Help / Advice Forum
Ok. So!

I'm trying to create a form in dreamweaver that can be filled out, and when you click submit, it sends the filled form out to my email.

I can't seem to get the email part to work. I'm so confused by it all.

I get asked to choose my email when I run the site and hit submit...that's not what I want.

I have been working all day at finding a solution and my brain is melting.

I read stuff about email servers, web servers, etc... I'm lost. What do I need to do to make this work? Do I need a different email than aim, is there something else I'm missing?

Thanks in advance doods.

hatsig.jpg
Evil Gummy on

Posts

  • RyeRye Registered User regular
    edited May 2010
    well, a mailto call will prompt a user to use their email client.

    You don't want that.

    What you want to do is either

    A) Learn PHP to compose and send the email, and Javascript to verify it.

    B) Use a free email form builder and embed it into your site. This is the simplest. I've used wufoo.com (Free, can be embedded, but has limits of entries per month [100] )

    If you have trouble, just post here and I could help you embed it in your site.

    Rye on
  • ThrackThrack Registered User regular
    edited May 2010
    I built a page that does exactly what you're looking for using ASP. Of course your web server has to support ASP for it to work. Below is the basic code for sending a message.
    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Sending email with CDO"
    myMail.From="mymail@mydomain.com"
    myMail.To="someone@somedomain.com"
    myMail.TextBody="This is a message."
    myMail.Send
    set myMail=nothing
    %>
    

    Thrack on
  • TejsTejs Registered User regular
    edited May 2010
    Rye has pretty much a good summary of the issue and your potential fixes. You need some server side technology to send emails. Your choice is in how you interact with that, by either making your own server that sends down a form that will post back to that server the email data, or embedding someone else's HTML page that has server side resources behind it in an iframe, or linking to that other someone's email form.

    Tejs on
  • PirateJonPirateJon Registered User regular
    edited May 2010
    What server are you using? does it support SMTP?

    PirateJon on
    all perfectionists are mediocre in their own eyes
  • Evil GummyEvil Gummy Registered User regular
    edited May 2010
    Um, how do I know what kind of server it is? Hehe.

    Evil Gummy on
    hatsig.jpg
  • Sharp101Sharp101 TorontoRegistered User regular
    edited May 2010
    Evil Gummy wrote: »
    Um, how do I know what kind of server it is? Hehe.

    The first thing you need to know is if you have a php or asp server.

    You can email your web hosting admin to find out.

    From there, anyone here can show you the code to do it :D

    Sharp101 on
  • ransimransim Registered User regular
    edited May 2010
    >_> or everyone could be completely overthinking the problem.

    You know, back in the day, before most of us had access to robust server environments we did actually use forms to send mail.

    The easiest, though not the prettiest method is just putting your email address in the action like:

    <form action="mailto:my@email.com" method="post">

    The best thing would be to see if your host already has a form mail perl script set up, it'll be located in the cgi bin. Its a basic perl script for mailing forms, if you see it there then you're basically done. You set that file as your action in the form tag. Depending on how its set up your may need to provide your email in a hidden field, but it may be automatically configured.

    Anything really complex form wise and you'll want to look into a server side language. But for a basic contact form it is probably overkill if you don't have experience with it.

    ransim on
  • TejsTejs Registered User regular
    edited May 2010
    I think the point though was that the OP didn't want to use whatever his configured email client was on his machine to send the email though.

    Tejs on
  • Evil GummyEvil Gummy Registered User regular
    edited May 2010
    Yeah, I'm unsure on a few things because my friend is the one who provided me with a server to use, and I dunno how to access any host info. That's alright, I'll end up getting my own host/server soon enough.


    For now, I guess I'll use Wufoo, it's decent enough for me to run some tests on the site to see if I even want the forms on there or not.


    What I'm gleaning, is that I need a server that supports php... and access to my cgi folder? I don't know where that is, exactly, I'm assuming on the host somewhere? OH these websites and codes and such!! :p

    Evil Gummy on
    hatsig.jpg
  • ThrackThrack Registered User regular
    edited May 2010
    There's an easy way to tell is the server is running ASP. Create a new file in dreamweaver, name it whatever.asp and put this in the body of the page:
    <%
    response.write("Hello World!")
    %>
    
    and then put the page on the server. When you view the page in your browser if it's blank you're not running ASP. If it says 'Hello World!' you're set.

    Thrack on
  • Evil GummyEvil Gummy Registered User regular
    edited May 2010
    What if it shows the code like you posted it?

    Evil Gummy on
    hatsig.jpg
  • ThrackThrack Registered User regular
    edited May 2010
    Right, that means that you don't have ASP. I didn't really think that through.
    At least now you know.

    Thrack on
  • Sharp101Sharp101 TorontoRegistered User regular
    edited May 2010
    Ok, now do the same thing but with
    <?php echo "Hello World!"; ?>
    

    and name the file whatever.php

    Sharp101 on
  • ransimransim Registered User regular
    edited May 2010
    The cgi-bin would just be a folder you can see in the list of folders when you connect to the server via ftp.

    If its a friend providing hosting though, you may not be set up with anything at all.

    If you want to test and see if you have php create a new page, call it phpinfo.php then past in this:
    <?php
    phpinfo();
    ?>
    

    If you see a page with a bunch of information on php when you load it in a browser then the server is running php.

    ransim on
  • TuttoTutto Registered User new member
    edited July 2010
    Here is an example of simple form from php form tutorial:
    [HTML]<form>
    <table>
    <tr>
    <td>Name *</td>
    <td><input type="text"></td>
    </tr>
    <tr>
    <td>Email *</td>
    <td><input type="text"></td>
    </tr>
    <tr>
    <td>Phone</td>
    <td><input type="text"></td>
    </tr>
    <tr>
    <td>Field_check</td>
    <td>
    <input type="checkbox" value="1"><label>Check_1</label><br>
    <input type="checkbox" value="2"><label>Check_2</label><br>
    <input type="checkbox" value="3"><label>Check_3</label>
    </td>
    </tr>
    <tr>
    <td>Message *</td>
    <td><textarea rows="5"></textarea></td>
    </tr>
    <tr>
    <td colspan="2"> </td>
    </tr>
    <tr>
    <td colspan="2"> </td>
    </tr>
    <tr>
    <td><input type="button" id="subbut" value="Submit"></td>
    </tr>
    </table>
    </form>[/HTML]

    Tutto on
Sign In or Register to comment.