GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Contact page scripts (https://gfy.com/showthread.php?t=1089654)

Rockhound 11-17-2012 04:26 PM

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

fatfoo 11-17-2012 04:35 PM

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">

AutumnBH 11-17-2012 04:37 PM

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;


?>


Rockhound 11-17-2012 05:04 PM

Quote:

Originally Posted by AutumnBH (Post 19318854)
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!

fris 11-17-2012 05:43 PM

lots of free ones

woj 11-17-2012 05:49 PM

Quote:

Originally Posted by Rockhound (Post 19318875)
Wow thanks!

that one is full of security holes :2 cents:

Rockhound 11-17-2012 08:29 PM

Quote:

Originally Posted by woj (Post 19318920)
that one is full of security holes :2 cents:

Anything better to suggest?

Rockhound 11-17-2012 08:31 PM

Quote:

Originally Posted by fris (Post 19318914)
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 :thumbsup

fris 11-24-2012 09:51 AM

Quote:

Originally Posted by Rockhound (Post 19319104)
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 :thumbsup

try this

http://dev7studios.com/demo/form-producer/

sixsax 11-24-2012 10:11 AM

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



All times are GMT -7. The time now is 10:56 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123