View Single Post
Old 01-06-2013, 08:31 AM   PM User | #10
minkoko
New Coder

 
Join Date: Aug 2010
Location: myeik
Posts: 72
Thanks: 4
Thanked 5 Times in 5 Posts
minkoko can only hope to improve
PHP Code:
<?php
if(isset($_POST['send'])){

$to "hqwebs.eu@gmail.com";
$name=$_POST['name'];
$phone $_POST['phone'];
$email $_POST ['email'];
$message $_POST['message']. "\n\n Phone Number is " .$phone;
$headers "From:" $email  ;
mail($to,$name,$message,$headers);

if(
mail){
echo 
"Mail Sent.";
}else{
    echo 
"Cannot Send your mail for error";
}
}
?> 
<form id=" action="email" method="post" contact-form">
<fieldset>
<label>
<input type="text" name = "name" value="Name" onBlur="if(this.value=='') this.value='Name'" onFocus="if(this.value =='Name' ) this.value=''" />
</label>
<label>
<input type="text" name = "email"vvalue="Email" onBlur="if(this.value=='') this.value='Email'" onFocus="if(this.value =='Email' ) this.value=''" />
</label>
<label>
<input type="text" name = "phone" value="Phone" onBlur="if(this.value=='') this.value='Phone'" onFocus="if(this.value =='Phone' ) this.value=''" />
</label>
<textarea name = "message" onBlur="if(this.value=='') this.value='Message'" onFocus="if(this.value =='Message' ) this.value=''">Message</textarea>
<div class="buttons-wrapper">
<a class="button" onClick="document.getElementById('contact-form').reset()">Clear</a>
<input type="submit" name="send" onClick="document.getElementById('contact-form').submit()" value="Send"></a>
</div>
</fieldset>
</form>
__________________
Quote:
Myanmar Web Developer & Designer
http://www.cyberoot.com
minkoko is offline   Reply With Quote
Users who have thanked minkoko for this post:
HQWebs (01-11-2013)