Contact page scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rockhound
    Confirmed User
    • Jan 2003
    • 334

    #1

    Contact page scripts

    Hi I'm looking for a good, hopefully free, contact page script that turns the form input into an email that is sent to my email.

    I would like it to be easily integrated into my design as well and not some white page with the form

    Thanks
    ALL BUSTY BABES - The Biggest Boobs On The Net
  • fatfoo
    ICQ:649699063
    • Mar 2003
    • 27763

    #2
    Maybe this will help:

    Input Type: email
    The email type is used for input fields that should contain an e-mail address.

    Example
    Define a field for an e-mail address (will be automatically validated when submitted):

    E-mail: <input type="email" name="usremail">
    Send me an email: [email protected]

    Comment

    • AutumnBH
      Confirmed User
      • Oct 2012
      • 298

      #3
      PHP Code:
      <?php
      
      // @author Autumn@BHW
      
      if($_POST['posted'] == 'yes') {
          $name    = $_POST['name'];
          $email   = $_POST['email'];
          $subject = $_POST['subject'];
          $message = $_POST['message'];
          $message = "$message - sent via online contact form";
      
          $contact_form_content = "<br /><br /><br /><b>Thank you for your message.  We'll get back to you as soon as possible!</b><br /><br /><br />
          Name: $name<br />
          Email: $email<br />
          Subject: $subject<br />
          Message: $message<br />
          <br />
          <br />
          <br />
          <br />";
          
          $headers = "From: $name <$email>\r\n";
          
          $send_to = '[email protected]';
      
          mail($send_to, $subject, $message, $headers);
      
      
      } else {
          $contact_form_content = '<form method="POST" action="contact.html">
                      <input type="hidden" name="posted" value="yes" />
                      <table width="80%" cellpadding="5" cellspacing="5" class="contact_form">
                          <tr>
                              <td width="26%">Full Name:</td>
                              <td width="74%"><input type="text" size="60" name="name" /></td>
                          </tr>
                          <tr>
                              <td>Email address:</td>
                              <td><input type="text" size="60" name="email" /></td>
                          </tr>
                          <tr>
                              <td>Subject: </td>
                              <td><input type="text" size="60" name="subject" /></td>
                          </tr>
                          <tr>
                              <td>Your message:</td>
                              <td><textarea name="message" rows="10" cols="50"></textarea></td>
                          </tr>
                          <tr>
                              <td>&nbsp;</td>
                              <td><input type="submit" value="Send message" /></td>
                          </tr>
                      </table>
                  </form>';
      
      }
      
      echo $contact_form_content;
      
      
      ?>

      Comment

      • Rockhound
        Confirmed User
        • Jan 2003
        • 334

        #4
        Originally posted by AutumnBH
        PHP Code:
        <?php
        
        // @author Autumn@BHW
        
        if($_POST['posted'] == 'yes') {
            $name    = $_POST['name'];
            $email   = $_POST['email'];
            $subject = $_POST['subject'];
            $message = $_POST['message'];
            $message = "$message - sent via online contact form";
        
            $contact_form_content = "<br /><br /><br /><b>Thank you for your message.  We'll get back to you as soon as possible!</b><br /><br /><br />
            Name: $name<br />
            Email: $email<br />
            Subject: $subject<br />
            Message: $message<br />
            <br />
            <br />
            <br />
            <br />";
            
            $headers = "From: $name <$email>\r\n";
            
            $send_to = '[email protected]';
        
            mail($send_to, $subject, $message, $headers);
        
        
        } else {
            $contact_form_content = '<form method="POST" action="contact.html">
                        <input type="hidden" name="posted" value="yes" />
                        <table width="80%" cellpadding="5" cellspacing="5" class="contact_form">
                            <tr>
                                <td width="26%">Full Name:</td>
                                <td width="74%"><input type="text" size="60" name="name" /></td>
                            </tr>
                            <tr>
                                <td>Email address:</td>
                                <td><input type="text" size="60" name="email" /></td>
                            </tr>
                            <tr>
                                <td>Subject: </td>
                                <td><input type="text" size="60" name="subject" /></td>
                            </tr>
                            <tr>
                                <td>Your message:</td>
                                <td><textarea name="message" rows="10" cols="50"></textarea></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><input type="submit" value="Send message" /></td>
                            </tr>
                        </table>
                    </form>';
        
        }
        
        echo $contact_form_content;
        
        
        ?>
        Wow thanks!
        ALL BUSTY BABES - The Biggest Boobs On The Net

        Comment

        • fris
          Too lazy to set a custom title
          • Aug 2002
          • 55679

          #5
          lots of free ones
          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

          Comment

          • woj
            <&(©¿©)&>
            • Jul 2002
            • 47882

            #6
            Originally posted by Rockhound
            Wow thanks!
            that one is full of security holes
            Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
            Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
            Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

            Comment

            • Rockhound
              Confirmed User
              • Jan 2003
              • 334

              #7
              Originally posted by woj
              that one is full of security holes
              Anything better to suggest?
              ALL BUSTY BABES - The Biggest Boobs On The Net

              Comment

              • Rockhound
                Confirmed User
                • Jan 2003
                • 334

                #8
                Originally posted by fris
                lots of free ones
                I've checked out some but none that I found could take on the look of my site...

                I was hoping somebody here would suggest one used from experience.

                Thanks to all who posted
                ALL BUSTY BABES - The Biggest Boobs On The Net

                Comment

                • fris
                  Too lazy to set a custom title
                  • Aug 2002
                  • 55679

                  #9
                  Originally posted by Rockhound
                  I've checked out some but none that I found could take on the look of my site...

                  I was hoping somebody here would suggest one used from experience.

                  Thanks to all who posted
                  try this

                  http://dev7studios.com/demo/form-producer/
                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                  Comment

                  • sixsax
                    Confirmed User
                    • Aug 2006
                    • 213

                    #10
                    You can modify the beginning of AutumnBHs script to disable unwanted header injection.

                    Code:
                    if($_POST['posted'] == 'yes') {
                      $name = trim(preg_replace('/\s+/s', ' ', $_POST['name']));
                      $email = preg_replace('/[\s<>]+/s', '', $_POST['email']);
                      $subject = trim(preg_replace('/\s+/s', ' ', $_POST['subject']));
                    
                      // etc

                    Comment

                    Working...