PDA

View Full Version : Php Mail Form!



awd
February 26th, 2003, 03:30 PM
can someone please give me the code to make a MAILFORM send it to hotmail account? I would like to add my own options how do I do that?
I would love to learn how to do this from a tutorial anyone know a good one? if not could someone please help me out!! the options that i wanted to add are alot of em! like probaly around 50 options! so...lol plz help me someone

redViper
February 26th, 2003, 04:05 PM
didnt you already post this?
just because you make more then one topic, doesnt mean people know the answer. :trout:

www.hostedscripts.com man, I told you.

Didiusthegreat
March 2nd, 2003, 11:37 AM
I mostly do it like this, In a html file i put this code:


<form action="(the folder where the php is located)/analyze.php" method="POST" target="_blank">
<p>Mail me!</p>
<table width="100%" border="0" cellspacing="10">
<tr>
<td width="15%"><font face="Arial" size="2"><b>Name:</b></font></td>
<td width="85%"><font face="Arial" size="2">
<input type="text" name="Name" size="50">
</font></td>
</tr>
<tr>
<td width="15%"><font face="Arial" size="2"><b>E-mail:</b></font></td>
<td width="85%"><font face="Arial" size="2">
<input type="text" name="Email" size="50">
</font></td>
</tr>
<tr>
<td width="15%" valign="top"><font face="Arial" size="2"><b>Adress:</b></font></td>
<td width="85%"><font face="Arial" size="2">
<input type="text" name="Adress" size="50">
<br>
<input type="text" name="Adress2" size="50">
</font></td>
</tr>
<tr>
<td valign="top"><strong>My site?:</strong></td>
<td width="85%"><p>
<input type="radio" name="Thought" value="Sucks">
Sucks<br>
<input type="radio" name="Thought" value="Rocks!">
Rocks! <br>
<input type="radio" name="Thought" value="Bwaa">
Bwaa <br>
<input type="radio" name="Thought" value="Is ok">
Is ok<br>
<input type="radio" name="Thought" value="Stupid Question">
Stupid Question</p></td>
</tr>
<tr>
<td width="15%" valign="top"><font face="Arial" size="2"><b>Comments:</b></font></td>
<td width="85%"><font face="Arial" size="2">
<textarea rows="4" name="Comment" cols="37"></textarea>
</font></td>
</tr>
<tr>
<td width="15%"></td>
<td width="85%" bgcolor="#FFFFFF"><input type="submit" value="Submit" name="submit"></td>
</tr>
</table>
</form>


And I then I need a php file to analyse the questions:

So in the php file (called analyze.php)


<?
$Subject ="Form mail";
$Name ="Name: $Name\n";
$Email ="E-Mail: $Email\n";
$Adress ="Adress: $Adress\n";
$Adress2 =" $Adress2\n";
$Thought ="Thought: $Thought\n";
$Comments ="Comments: $Comment\n";
$Date="Date: " . date("d-m-Y H:i:s") . "\n\n";
mail("My@email.com", "$Subject", "$Date $Name $Email $Adress $Adress $Thought $Comments", "From: $Email");

echo '<font face="Arial" size="2">Your comments are send! Thnx for the reply</font>';
?>


I hope it helps, If you have any questions, ask them!

Dave
March 3rd, 2003, 09:39 AM
http://www.actionscript.org/showMovie.php?id=338

if u need help with it, ask me =)

It works fine!

U MUST HAVE A PHP SUPPORTING SERVER THOUGH!!