SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast LucDeacu's Avatar
    Join Date
    Apr 2005
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Linking The Submit Button

    Hello everyone,

    Sorry for such a newbish question but I've just a couple days ago began using dreamweaver. So far everything is going great, I've learnt to slice and code my templates with ease. My problem lies in the form part.

    I've created a form on one of my sites using dreamweaver and was wondering how you make the "Submit" button send the information that's been filled out to your email upon clickage?

    Thanks,

    Luc
    WebTouchUp.com
    Website touch-ups at flat rates! 64 hour turn-around time!
    Why get a re-design when you can get an upgrade?

  2. #2
    Guru Meditation Error gnarly's Avatar
    Join Date
    Dec 2003
    Location
    Cheltenham, United Kingdom
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need a script on the server to handle the e-mail and fire it off.

    Firstly, find out what language your server is capable of interpreting (PHP, CFM, ASP, etc), then either google for a script in that language, or ask in the right forum over here.
    Olly Hodgson
    thinkdrastic.net

  3. #3
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    You need a formmail script. A quick Google search will show you a ton of free ones out there to use.

  4. #4
    SitePoint Zealot D.D.S. Polymath's Avatar
    Join Date
    Apr 2005
    Location
    Regnvm ServiŠ
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The script that submits your form is usually referred to as a "form processor", although there are other, similar phrases in use. They are most commonly written either in PHP or Pearl (CGI scripts). You will most probably use a PHP script, as most web hosts tend to support the free yet powerful open-source PHP technology, and there are many such scripts called "formmail" or something of the kind widely available on the Internet. They can be free or commercial, and range from basic to quite advanced and rich in features. The choice which to use for your projects is yours in the end.
    Be not too sure that none of the old magic endures...

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or just go to www.hotscripts.com and pick one out.

    However, before you integrate it with your form, you may want to ask the gurus here (in the proper forum--ASP for an ASP or .NET form mail script, Perl for a Perl Script, or PHP for a PHP script) if there are any security issues with the script in question, and how you can go about getting them fixed.

    I'm saying this because I've seen a lot of scrips (not a typo) and "tutorials" that are not only written poorly, but have security issues so wide you could fly the Space Shuttle through them with ease.

  6. #6
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Everybody already forgot it, but you can leave it all to client. The disadvantages of this method are obvious, but it does not require server side scripting. If there are no scripting supported at all on your server, it can be the only solution.
    HTML Code:
    <form action="mailto:your@email.tld">
    <input type="text" name="subject" /><br />
    <textarea name="body"></textarea><br />
    <input type="submit" value="Send" />
    </form>
    Saul

  7. #7
    SitePoint Enthusiast LucDeacu's Avatar
    Join Date
    Apr 2005
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, I've learnt so much from just a couple of posts

    Php_daemon, this is what my form looks like, could you please tell me where to put the form code you gave me?


    HTML Code:
    <td width="252" rowspan="3" valign="top"><img src="NetWork Guys/images/networkguys_18.jpg" width="246" height="46" />
          <form id="form3" name="form3" method="post" action="">
          </form>      </td>
      </tr>
      <tr>
        <td height="24" colspan="3" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
        <td></td>
      </tr>
      <tr>
        <td width="190" rowspan="6" valign="top"><form id="form1" name="form1" method="post" action="">
          <label><span class="style1">Name        </span></label>
          <p class="style1">
            <label>Birthday        </label>
            </p>
              <p class="style1">Address
                <label></label>
                <label></label>
              </p>
              <p class="style1">&nbsp;</p>
        </form>
          <p align="justify" class="style1">Type </p>      <p align="justify" class="style1">Have you used it? </p></td>
        <td colspan="2" rowspan="6" valign="top"><form id="form2" name="form2" method="post" action="">
          <label>
            <input type="text" name="textfield" />
            </label>
            <p>
              <label>
                <input name="textfield2" type="text" />
                </label>
              </p>
              <p>
                <label>
                <textarea name="textfield3"></textarea>
                </label>
              </p>
              <p>
                <label>
                <select name="select">
                  <option>1</option>
                  <option>2</option>
                  <option>3</option>
                  <option>4</option>
                </select>
                </label>
              </p>
              <p>
                <label>
                <input name="checkbox" type="checkbox" value="checkbox" />
                Yes </label>
                <label>
                <input name="checkbox2" type="checkbox" value="checkbox" />
                N
                o</label>
              </p>
              <p>
                <label>
                <input name="Submit" type="submit" value="Submit" />
                </label>
              </p>
        </form></td>
        <td height="14"></td>


    Thanks so much,
    Luc
    Last edited by stymiee; Sep 20, 2006 at 12:08.
    WebTouchUp.com
    Website touch-ups at flat rates! 64 hour turn-around time!
    Why get a re-design when you can get an upgrade?

  8. #8
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm afraid with the form you have there's no other way but using a server side script as others suggested. My snippet is only good for a simple contact form.
    Saul


Bookmarks

Posting Permissions

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