Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: PHP mailform code

  1. #11
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by chechu
    ... if the above code doesn't work, it means that there is no coding problem, but an external problem (like hosting) ?
    It's a potential problem, but far from the only one. The tweaks by codeexploiter still don't address the most grievous error: injection. Malformed user input, whether it be intentional or not, can cause the code to fail or to become a tool for sending spam.

    Either use a third-party to handle sending mail, or use a well-established library to validate and process input. The current code should be scrapped.

    Mike

  2. #12
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Quote Originally Posted by Mwinter
    he tweaks by codeexploiter still don't address the most grievous error: injection. Malformed user input, whether it be intentional or not, can cause the code to fail or to become a tool for sending spam
    The code that I've provided was just a skelton using which the other user can build themselves into whatever they are looking for.

  3. #13
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    So if I need the following in the .php:
    - name, email, subject and message
    - error notification in new page when data are not all filled in
    - thanks message in new page
    - send notification mail to sender
    - in the <form>: sending with <img>

    How would it look like ?

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
  •