Can somebody explain exactly how i put the php form handler in my html code?

6 Responses to “Can somebody explain exactly how i put the php form handler in my html code?”

Comments

  1. neodracolith says:

    It goes something like this:

  2. hands.adrian says:

    usually apache is configured to process php in pages that end with “.php”. those pages can contain plain html too. if you want to run the php handler on a page that ends in “.html”, there are ways to do that too, but i don’t know if that’s what your after.

  3. Mark V says:

    Name:

    Email:

    There’s a basic Email form for yah, not sure where you were getting at

  4. just "JR" says:

    Two ways: the simple one for amateurs and the complex one for professionals (much more efficient).
    SIMPLE:


    mailto:… find details in w3schools.com

    COMPLEX:
    in calling file (something.html)

    in receiving file (email.php)
    treat the data from the form (variables: $_POST [ ' variablename ' ] )
    Build $headers, $subject, $message, $to
    $res = mail ($to, $subject, $message, $headers);

    for more details:, search “mail” in functions.

    It get more complex to add file uploads, attachments etc…

  5. ladyaibrean says:

    Please email me if you need more explanation.

    Typically the form action in the HTML links to the PHP that has the form processing information.

    The mailer.php is a generic thing I put there but it would be whatever you use (I use Jack’s formmail). The php file would be where you put the information relating to who the email gets delivered to and the message a user gets when they fill out the form.

  6. princeexpedition says:

    The simple way is just need to make a form (inside a something.html) for posting the items´s value and send those item´s value to another page(ie: email.php) through form method “POST” or “GET” But u should use to POST method. Once you got those values into email.php then just write this following below code.

    in calling file (something.html)

    in receiving file (email.php)
    variables: $_POST [ ' variablename ' ] )

    Build $headers, $subject, $message, $to
    $res = mail ($to, $subject, $message, $headers);

Share Your Thoughts

You must be logged in to post a comment.