Review Send Form from your Website.


<?php
if(isset($_POST['submit'])){
    $to = "youremail@gmail.com"; // this is your Email address
    $from = $_POST['email']; // this is the sender's Email address
    $first_name = $_POST['first_name'];
    $last_name = $_POST['last_name'];
    $email = $_POST['email'];
    $company = $_POST['company'];
    $subject = "( $first_name Post New Review For BLU N White.com )  ";
    $mobile =  $_POST['mobile'];
    $select =  $_POST['select'];
    $subject2 = "Copy of your form submission";
    $message = "Dear Website Admin,\n\n  Client provides feedback for our services details are below,\n \n
    CLIENT NAME : "   .    $first_name . " " ."\n\n" . " ADDRESS : " . $last_name . " "."\n\n" . "CITY : " . $email.""."\n\n" ."COMPANY NAME : ". $company.""."\n\n" ."MOBILE NUMBER : ". $mobile.""."\n\n" ."STAR RATING : " . $select." \n\n REVIEWS DETAILS BELOW :" . "\n\n" . $_POST['message'];
 
 
 
 
 
 
 
 
 
 
 
 
    $message2 = "Here is a copy of your message " . $first_name . "\n\n" . $_POST['message'];

    $headers = "From:" . $from;
    $headers2 = "From:" . $to;
    mail($to,$subject,$message,$headers);
    mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
   $thanks= "Review Sent. Thank you " . $first_name . ", we will Show your Review At Our Client review page shortly.";
    // You can also use header('Location: thank_you.php'); to redirect to another page.
    }
?>

<!DOCTYPE html>
<head>
<title>Form submission</title>
<style>

input[type=text], select {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
}

input[type=submit] {
    width:100%;
    background-color: #EC008B;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: #45a049;
}

div {

    border-radius: 5px;
    width:100%;
 
    background-color: #f2f2f2;
    padding: 0px;
   
}



</style>

</head>
<body bgcolor="" >





<div align="center">
<img src="images/1.png" alt="/images/feedback1.jpg" height="150" width="200">


<form action="" method="post">
<table  >
<h2>
<font color="blue">
<?php echo $thanks; ?></font></h2>

<tr>
<td>
Your Name:<img src="images/mand1.png" alt="/images/feedback1.jpg" height="" width=""></td> <td><input type="text" name="first_name" required="this field" ></td></tr><br>
<tr><td> Company:</td> <td><input type="text" name="company"  ></td></tr><br>
<tr><td> Address:<img src="images/mand1.png" alt="/images/feedback1.jpg" height="" width=""></td> <td><input type="text" name="last_name" required="this field"></td></tr><br>
<tr><td> City:<img src="images/mand1.png" alt="/images/feedback1.jpg" height="" width=""></td> <td><input type="text" name="email" required="this field"></td></tr><br>
<tr><td> Mobile:<img src="images/mand1.png" alt="/images/feedback1.jpg" height="" width=""></td><td> <input type="text" name="mobile" required="this field"></td></tr><br>
<tr><td> Comment:<img src="images/mand1.png" alt="/images/feedback1.jpg" height="" width=""></td><td><textarea rows="5" colum="20" name="message" cols="30" required="this field"></textarea></td></tr><br>

<tr><td>Star Rating:<img src="images/mand1.png" alt="/images/feedback1.jpg" height="" width=""></td><td><select size="5"  name="select" id="select" required="this field"><br>

  <option value=" 5 Stars"> 5 Star Rating - Superb Services </option>
  <option value=" 4 Stars"> 4 Star Rating - Best Services </option>
  <option value=" 3 Stars"> 3 Star Rating - Better Services </option>
  <option value="2 Stars"> 2 Star Rating  - Good Services </option>
  <option value=" 1 Stars"> 1 Star Rating - Fair Services </option>


</select><br></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit"></td></tr>

</table>






</form>
</div>


</body>
</html> 

Comments

Popular posts from this blog

How to filter data from database according to client name & date wise in PHP

Captcha Code In PHP