2012-02-10 6 views
-1

私はフォームを持っていますが、私はmail.phpが必要ですが、私はPHPの専門家ではありません。ここに私のフォームコードは、私は基本的にユーザーがフォームを送信する前にチェックする必要がある免責事項である最終的には別のチェックボックスを必要とし、この中フォームのためのmail.phpスクリプトが必要です

<form id="form1" id="form1" action="mail.php" method="POST"> 

    <label>Name 
     <span class="small">Add your name</span> 
    </label> 
<input type="text" name="name"> 
    <label>Email 
     <span class="small">Enter a Valid Email</span> 
    </label> 
<input type="text" name="email"> 
    <label>Phone 
     <span class="small">Add a Phone Number</span> 
    </label> 
<input type="text" name="phone"> 
<label>DOB 
     <span class="small">Date Of Birth</span> 
    </label> 
<input type="text" name="dob"> 

<br /> 
<br /> 

    <label>Salary 
     <span class="small">Your annual Salary</span> 
    </label> 
<input type="text" name="salary"> 

    <label>Loan Amount 
     <span class="small">Loan</span> 
    </label> 
<input type="text" name="loan"> 

    <label>Property Value 
     <span class="small">value of property</span> 
    </label> 
<input type="text" name="property"> 
    <label>City 
     <span class="small">City </span> 
    </label> 
<input type="text" name="city"> 
<br /> 
<br /> 
<br /> 
    <label>Occupation 
     <span class="small">Occupation</span> 
    </label> 
<select name="type" size="1"> 
<option value="update">Salaried</option> 
<option value="change">Self Employment</option> 
</select> 
<br /> 
<br /> 
<br /> 


    <label>Message 
     <span class="small">Type Your Message</span> 
    </label> 
<textarea name="message" rows="6" cols="25"></textarea><br /> 

    <button type="submit" value="Send" style="margin-top:15px;">Submit</button> 
<div class="spacer"></div> 

</form> 

です。前もって感謝します。

+2

これは「私にコードを渡す」質問であり、ここでは望ましくありません。あなたが特定の質問をし、あなたの一部にいくつかの努力を示すのを手助けしたいなら。 –

答えて

0

この記事を読むことができます。 http://www.w3schools.com/php/php_mail.aspそれをどうやってやるべきか説明しています。 簡易メール機能は以下のように書くことができます。

<?php 
$to  = '[email protected]'; 
$subject = 'the subject'; 
$message = 'hello'; 
$headers = 'From: [email protected]' . "\r\n" . 
    'Reply-To: [email protected]' . "\r\n" . 
    'X-Mailer: PHP/' . phpversion(); 

mail($to, $subject, $message, $headers); 
?> 
関連する問題