Question about forms

Discussion in 'HTML & Website Design' started by Xangular, Jun 30, 2007.

Thread Status:
Not open for further replies.
  1. #1
    I was wondering how you get a form to send to your email without opening outlook. Can anyone tell me the code for this. Does it require php. I know that is an option because that is what my designer did for my site but is there a way to do it through html?
     
    Xangular, Jun 30, 2007 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is no way through HTML to do it as HTML is static but what you require is a sendmail script.

    This can be done with CGI, PHP, ASP, .Net, CFM, JSP or any other serverside scripting language/ framework that I have forgotten. You need to check which your webhost supports and then get a free script to do the necessary
     
    AstarothSolutions, Jul 1, 2007 IP
  3. jgjg

    jgjg Peon

    Messages:
    595
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    jgjg, Jul 1, 2007 IP
  4. SupernalMedia

    SupernalMedia Well-Known Member

    Messages:
    427
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #4
    If you make a form, then make the inputs such as, your email, then your message. You can do something like the following...

    
    mail("youremailhere@w/e.com","Subject","$_POST[message]","From: $_POST[email] r/n/");
    
    Code (markup):
    That would work without opening an outlook thing, hopefully that is what you were looking for...
     
    SupernalMedia, Jul 1, 2007 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #5
    HTML is a structural markup language and as such is incapable of processing form data (though it can define the structure of the forms just fine). You're going to need a server-side programming language (and it has to be installed on your server in order to use it).

    If you're going to use PHP, I suggest you take a strong look at these two:
    http://www.dustindiaz.com/ajax-contact-form
    http://green-beast.com/blog/?page_id=71
     
    Dan Schulz, Jul 2, 2007 IP
  6. Vic_mackey

    Vic_mackey Banned

    Messages:
    2,093
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Vic_mackey, Jul 2, 2007 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    Which unfortunately doesn't cover any form of session ID's or cookie securities, much less referrer meaning anyone and their cousin could hijack it for spamming uses... Worse, since it uses _REQUEST you could feed it post or get... Security hell.

    I would avoid that except as a stepping stone in learning - for deploying live there's a lot of other stuff that really should be in there unless you want spammers 'borrowing' your server.
     
    deathshadow, Jul 2, 2007 IP
Thread Status:
Not open for further replies.