SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot Zafar Ahmed's Avatar
    Join Date
    Apr 2004
    Location
    Karachi
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    contact me form?

    Hi,

    how can I create 'Contact Me Email Form' with Dreamweaver?
    Xenon Web Solutions -Web Development Company Based In Pakistan
    -As I walk through life....

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Have you tried searching google for "email form PHP" or something of the sort?

  3. #3
    SitePoint Zealot Zafar Ahmed's Avatar
    Join Date
    Apr 2004
    Location
    Karachi
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did. I can find pre-made codes easily, I just need to know how can I create it myself with dreamweaver if it's possible?
    Xenon Web Solutions -Web Development Company Based In Pakistan
    -As I walk through life....

  4. #4
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I don't know if Dreamweaver has something to help you do this specifically (have you searched the documentation?), but this is something fairly small so you should be able to code it by yourself without too much hassle. In the past I've simply adapted pre-made scripts I've found on the internet to suit my needs.

    In the most basic form, you need to follow these steps (everything within a single PHP file, so the form is submitted to the same file):
    • Check if the form was submitted.
    • If it was, check if the required fields were filled in correctly. You should check the entered email address with a regular expression to make sure it is at least a valid address.
    • If everything is OK, send the email and do not output the form again. Either redirect to another page or display "email sent" message.
    • If there is something wrong, output the form HTML including the things the user already entered so they don't need to type it all over again. Perhaps include a small message to indicate exactly where they've done something wrong
    • If the submit button was not pressed, simply output the bare HTML form.
    It is probably a good idea to add something to stop spambots from spamming your email. You can use a CAPTCHA, or a simple check box ("check this box if you're human") or even if you want to be original some method of your own (some people make the user solve a simple mathematical problem, like "what is 3 - 1 ?" - obviously the problem changes each time).

  5. #5
    SitePoint Addict iwonder's Avatar
    Join Date
    Feb 2005
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zafar Ahmed View Post
    Hi,

    how can I create 'Contact Me Email Form' with Dreamweaver?
    Try this
    http://www.phpjabbers.com/make-conta...php-php21.html

    GFXedit DesignsFree/Custom CSS Designs & Wordpress themes
    Web 2.0 & Me | Personal Blog | IndianWebDevs | AutoPundit |

  6. #6
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    That script doesn't check to see if the email entered is valid. This is an example of a regular expression to check against:
    Code:
    ^[a-z0-9_\-]+(\.[_a-z0-9\-]+)*@([_a-z0-9\-]+\.)+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)$
    It's also a good idea to check that the form was submitted from that actual page, e.g. give the Submit button a less generic name than "submit", such as "zafar", and perhaps also check that the referrer header matches the page the form is on.


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
  •