Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi , well , i am looking for a free CGI that supports form for my website , and send the information to my mail and also i need that i can put my own "thanks" page after the form.
Thank you
for your help

A very simple one, written in PHP. Your server must allow you to use PHP-scripts, and allow you to use SMTP.
The form you can use looks like this, alter it to fit your style:
<form method="post" action="mail.php">
Name:
<input type="text" name="Name" size="40" maxlength="40">
Your Email:
<input type="text" name="Email" size="40" maxlength="40">
Your message:
<textarea name="Message" rows="6" cols="30">
</textarea>
<input type="submit" value="Mail me">
</form>Then, make a new file called "mail.php" and put in the following code (within the HTML-tags, and dont forget the <? and ?>):
<?
$Email=$_POST['Email'];
$Name=$_POST['Name'];
$Message=$_POST['Message'];
$mailbody = $Message;
$mailbody .= "\n\n\nName: ".$Name." ".$Email;
$mailrecieve = "your@mail.com";
$mailsubject = "Message from site";
$mailfrom = "From: YourName";
mail($mailrecieve, $mailsubject, $mailbody, $mailfrom);
$result = "Your message has been sent";
?>Off course there are many more advanced mailscripts with validation and so on, but this the most simple one you can imagine...

Search on Google for CGI scripts, PHP scripts, there are plenty of free script sites covering anything you want from scripts.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |