How to activate a form

8 replies
Hi Warriors,

Can someone please explain to me how visitors can use my contact form on my website, through my website and not using their e-mail account?

I really appreciate any help.

Best,
#activate #form
  • {{ DiscussionBoard.errors[10313229].message }}
    • Profile picture of the author wordpress+expert
      Html form in file form.html:

      <form action="send.php" method="post">
      <input type="text" name="name" placeholder="First name" />
      <input type="text" name="phone" placeholder="Phone" />
      <input type="text" name="email" placeholder="E-mail" />
      <input type="submit" value="Send" />
      </form>

      php script in file send.php:

      <?php
      $admin_email='';

      $subject='New message';
      if(isset($_POST['phone']) AND !empty($admin_email)){
      $firstname='';
      $phone='';
      $email='';
      $message=$firstname.$phone.$email;
      $site_email= 'info@'.$_SERVER['SERVER_NAME'];
      if($_POST['name'])$firstname='Name: '.$_POST['name'].$PHP_EOL;
      if($_POST['phone'])$phone='Phone: '.$_POST['phone'].$PHP_EOL;
      if($_POST['email'])$email='E-mail: '.$_POST['email'].$PHP_EOL;

      $header = 'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'From: '.$site_email.' <' . $site_email . ">\n";
      mail(trim($admin_email), '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header);
      echo 'Thanks!';
      }

      ?>

      sample: http://wordpress-expert.net/demo/php...orm/script.zip
      {{ DiscussionBoard.errors[10313258].message }}
      • Profile picture of the author AboutTown
        I like this one: It's free, has a lot of features. Just needs installation on a php enabled server: Download - Free Contact Form PHP Script | Fast Secure Contact Form
        {{ DiscussionBoard.errors[10313281].message }}
      • Profile picture of the author IO Cape Town
        Hi man,

        Thank you so much! But when I use the form on my website, it does not send the input along the the application.

        Regards,

        [QUOTE=wordpress+expert;10313258]Html form in file form.html:

        <form action="send.php" method="post">
        <input type="text" name="name" placeholder="First name" />
        <input type="text" name="phone" placeholder="Phone" />
        <input type="text" name="email" placeholder="E-mail" />
        <input type="submit" value="Send" />
        </form>
        {{ DiscussionBoard.errors[10432490].message }}
  • Profile picture of the author juangarciamtl
    If your server does not support the mail php
    then you can use php emailer. create a gmail account and use it as the sender
    and you put yourself as the receiver

    https://github.com/PHPMailer/PHPMailer

    its very easy to use. if you know php
    Signature

    More than 105 modules , scrapes, post and make money.
    http://autopostingtools.com/

    {{ DiscussionBoard.errors[10363938].message }}
    • Profile picture of the author Joe Ray
      It's easy to find a php code snippet that will process your form input, however, there are some security issues you should consider before you try to deploy any back-end code.
      {{ DiscussionBoard.errors[10365695].message }}
  • Profile picture of the author robomedia
    PM me with details. I'm doing a week of free programming help to Warriors
    {{ DiscussionBoard.errors[10373702].message }}
  • Profile picture of the author OaldDesign
    Hey in order to the form to work you need to connect it to your website using php.
    The way it works once the user click on the form button and get activated by the php file and send the email to the user or to yourself.
    Signature

    Graphic Design & Web Development Services: http://www.oalddesign.com
    Banner Design Services: http://bannercheapdesign.com

    {{ DiscussionBoard.errors[10395387].message }}

Trending Topics