What is the code to add a default subject to a Email contact/orderform in PHP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sean Watkins
    New Member
    • Jan 2011
    • 48

    #1

    What is the code to add a default subject to a Email contact/orderform in PHP?

    Hey guys,

    New challenge I am trying. I have a Order Form for a website. All the information emails directly to me correctly. The only problem I am having is the subject line of that email is (no subject). What would I need to put in the PHP script to have a default email subject.

    Example: Website Customer

    Would I just use $subject=


    The form is located at http://www.penciledmemories.com/orderformre.html Incase a reference is needed for help. Thanks in advance!
  • AutumnsDecay
    New Member
    • Mar 2008
    • 170

    #2
    Yes.

    The PHP mail() function syntax is:

    Code:
    mail($to, $subject, $message, $headers);
    So if you just have

    Code:
    $subject = "THIS IS A SUBJECT";
    that should work.

    Comment

    • Sean Watkins
      New Member
      • Jan 2011
      • 48

      #3
      Thank you AtumnsDecay, you are always very helpful Sir.

      Comment

      • Sean Watkins
        New Member
        • Jan 2011
        • 48

        #4
        AtumnsDecay, perhaps you can help me with this question I have here http://bytes.com/topic/php/answers/9...re-server-form

        Comment

        Working...