HighDots Forums  

Need PHP script for my form

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Need PHP script for my form in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
|:::. George .::::|
 
Posts: n/a

Default Need PHP script for my form - 07-06-2004 , 12:40 AM







HI guys, I'm using Matt's Script FormMail and I'm getting too much
spam. Where can I find a good php script to use it on my site?. PHP or
any other were you can't see the email where you are sending the
information since that's how spammers are getting my email address.

Thanks!




Reply With Quote
  #2  
Old   
Roy Reed
 
Posts: n/a

Default Re: Need PHP script for my form - 07-06-2004 , 03:03 AM







"|:::. George .::::|" <george-cade (AT) nyc (DOT) rr.com> wrote

Quote:
HI guys, I'm using Matt's Script FormMail and I'm getting too much
spam. Where can I find a good php script to use it on my site?. PHP or
any other were you can't see the email where you are sending the
information since that's how spammers are getting my email address.
The NMS version of FormMail will do what you want and it's MUCH more secure
than Matt's version.

http://nms-cgi.sourceforge.net/scripts.shtml

--
Must fly

Roy

www.reeddesign.co.uk




Reply With Quote
  #3  
Old   
Alan
 
Posts: n/a

Default Re: Need PHP script for my form - 07-06-2004 , 05:53 AM



most of the formmail type scripts use a hidden form field for "recipient".
The spambots read source code- so they "see" that email address.

To fix that- a script that hardcodes the recipient into the script, or
allows using an alias to pick from a list of hardcoded recipients.
(or modify a script you like so that it's hardcoded)

this one is set up with aliasing of the recipient
http://members.rogers.com/mail.4.donpro/
It's got more features, like sending file attachments also.

this php script doesn't have the aliasing- but can be modified.
http://boaddrink.com -->phpformmail
Search their support forum, there's a half-dozen threads about hidden
recipient mods.



Quote:
HI guys, I'm using Matt's Script FormMail and I'm getting too much
spam. Where can I find a good php script to use it on my site?. PHP or
any other were you can't see the email where you are sending the
information since that's how spammers are getting my email address.

Thanks!





Reply With Quote
  #4  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Need PHP script for my form - 07-06-2004 , 08:56 AM



On 06 Jul 2004 in macromedia.dreamweaver, Alan wrote:

Quote:
most of the formmail type scripts use a hidden form field for
"recipient". The spambots read source code- so they "see" that email
address.

To fix that- a script that hardcodes the recipient into the script,
or allows using an alias to pick from a list of hardcoded
recipients. (or modify a script you like so that it's hardcoded)

this one is set up with aliasing of the recipient
http://members.rogers.com/mail.4.donpro/
It's got more features, like sending file attachments also.

this php script doesn't have the aliasing- but can be modified.
http://boaddrink.com -->phpformmail
Search their support forum, there's a half-dozen threads about
hidden recipient mods.
PHP is easy enough to code a mail form in that you really don't need to
use canned solutions:

in contactform.php:
....
<form method="POST" action="process.php">
<input type="text" name="name" size="50">
<input type="text" name="email" size="50">
<input type="text" name="subject" size="50">
<textarea name="message_text" cols="50" rows="15"></textarea>
<input type="submit" value="Send Email">
</form>
....

and in process.php:
....
<h1>Thanks for writing!</h1>
<?php
$from = "From: " . $_POST['name'] . " <" . $_POST['email']. ">";
$subject = $_POST['subject'];
$message = $_POST['message_text'];
$to = "me (AT) mydomain (DOT) invalid";
mail($to, $subject, $message, $from);
?>
....

Pretty up, add error checking, etc to your heart's content.

More information:
http://us4.php.net/manual/en/function.mail.php

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
  #5  
Old   
Gordon Mackay
 
Posts: n/a

Default Re: Need PHP script for my form - 07-06-2004 , 11:57 AM



Joe Makowiec wrote:
Quote:
On 06 Jul 2004 in macromedia.dreamweaver, Alan wrote:


most of the formmail type scripts use a hidden form field for
"recipient". The spambots read source code- so they "see" that email
address.
Try this out on a page with a PHP extension (.php)


<?php if ($_POST){ if
(mail("YOU (AT) YOU (DOT) COM",$_POST['subject'],stripslashes($_POST['body']),"From:
".$_POST['email']."\r\n")){ ?>
<p>Your message is now winging its way to me at supersonic speed!</p>
<h2>You said:</h2>
<blockquote>“<?php echo "$body" ?>”.</blockquote>
<p>I will be in touch with you as quickly as possible.</p>
<?php }else{ ?>
<p>Message Failed, the gremlins are playing up!</p>
<?php } }else{ ?>
<form action="<?PHP echo $_SERVER['PHP_SELF']; ?>" method="post"
name="mailform" id="mailform">
<fieldset title="Send Me Some Mail">
<legend>Send Me Some Mail</legend>
<label for="subject">Subject:</label>
<select name="subject" id="subject">
<option selected="selected">Enquiry</option>
<option>Suggestion</option>
<option>Praise</option>
<option>Design Work</option>
</select>
<label for="email">Email:</label>
<input name="email" type="text" id="email" value="Your email here" />
<label for="body">Message:</label>
<textarea name="body" cols="30" rows="12" id="body">Message you wish to
send</textarea>
<input type="submit" name="Submit" value="Send" id="Submit" />
</fieldset>
</form>
<?php } ?>

That should work like a charm

Gordon M

http://gordonmac.com/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.