Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End need code for this EMAIL FORM

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #32408
    ylex1
    Participant

    Hi!
    I need a php code for my email form I’ve found some but I don’t know how to include it. Can you guys help me!! Please! Thank you!



    Nombre:




    E-mail:




    Mesaje:






    here’s the website http://www.cetem.com.mx/tecnico.html

    #50396
    lyleyboy
    Member

    Hi,

    Not wishing to sound rude but I think you may be out of your depth here.

    A couple of things
    1, The form action needs to point to the PHP page that you want to send the email. At the moment it’s pointing to an ASP page.
    2, The form method should be post really.

    To give you some idea the input name fields will become the variable names in your PHP.
    So in PHP the first name variable will be

    $_POST

    Now you have your variables you just need to attach them to the email


    $to = "[email protected]";
    $subject = "Contact Form";
    $body = "First name: " . $_POST;
    mail($to, $subject, $body);
    #49449
    ylex1
    Participant

    thanks man!

    #49451
    eagleworks
    Member

    Replace your “p” tags with “label” tags aswell.

    Also suggest when collecting the form data with PHP run it though htmlentities()for security.

    $f_nombr = htmlentities($_POST);

    #49313
    ylex1
    Participant

    Thank you
    Do you have any html email form tutorial that you can refer me to?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.