it is based on Email template, here we are going to create a feedback and contact form using php email concept, user friendly php email template. when we are using sending email from the website, the mail should go to the admin of the website. i.e. the visitor feedback or contact details submission on the website to website admin enquiry.
as you can see in the above image, the email is from visitor to admin of the website. let see the coding of it.
HTML FORM CODE
index.php
<div class="container"> <form action="email.php" method="post"> <p> <input type="text" required placeholder="Enter your firstname" name="firstname" /> </p> <p> <input type="text" required placeholder="Enter your lastname" name="lastname" /> </p> <p> <input type="email" required placeholder="Enter your email" name="email" /> </p> <p> <input type="text" required placeholder="Enter your number" name="number" /> </p> <p> <textarea name="feedback" required placeholder="Enter your Feedback" ></textarea> </p> <p> <input type="submit" name="send" value="Submit your Request"> </p> </form> </div>
PHP CODE FOR THE MAIL
email.php
<?php if(isset($_POST['send'])) { extract($_POST); $to="xxxx@gmail.com"; //change to ur mail address $strSubject="Feedback of 1Next2"; $message .= "<html>\n"; $message .= "<body> <div>Dear ".$firstname.",<div> <table collspan=\"5\"> <tr> <td colspan='3'>Feedback from visitors</td> </tr> <tr> <td>Firstname</td> <td>: </td> <td><strong>".$firstname."</strong></td> </tr> <tr> <td>Lastname</td> <td>: </td> <td><strong>".$lastname."</strong></td> </tr> <tr> <td>Email-id</td> <td>: </td> <td><strong>".$email."</strong></td> </tr> <tr> <td>Contact Number</td> <td>: </td> <td><strong>".$number."</strong></td> </tr> <tr> <td>Message</td> <td>: </td> <td><strong>".$feedback."</strong></td> </tr> </table> "; $message .= "</body>\n"; $headers = 'MIME-Version: 1.0'."\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n"; $headers .= "From: info@1next2.blogspot.com"; $mail_sent=mail($to, $strSubject, $message, $headers); if($mail_sent) echo "<script>alert('Thank you. we will get back to you'); window.location='index.php';exit();</script>"; else echo "<script>alert('Sorry.Request not send'); window.location='index.php';exit();</script>"; } ?>
We hope this post is really helpful to you.. thank you.
Web Development Company
ReplyDeleteHow to build a luxury car with the cost of titanium
ReplyDeleteThe cost of titanium wedding ring titanium is not titanium cost that much, but a factor we consider 개집 왕 is in the price. In microtouch titanium order to get the best value, you titanium nitride gun coating need to make your car with the best value.
dq156 nfl jerseys,Cheap Jerseys free shipping,nfl jerseys,Cheap Jerseys free shipping,cheap jerseys,cheap jerseys,cheap jerseys,cheap jerseys,nfl shop tf257
ReplyDeleteKanarya Adaları yurtdışı kargo
ReplyDeleteKanada yurtdışı kargo
Kamerun yurtdışı kargo
Kamboçya yurtdışı kargo
Jersey yurtdışı kargo
L8V0
Eskişehir
ReplyDeleteAdana
Sivas
Kayseri
Samsun
2CT1VU
0F9C2
ReplyDeleteÇankırı Parça Eşya Taşıma
Diyarbakır Lojistik
Çorum Şehir İçi Nakliyat
Aydın Evden Eve Nakliyat
Eryaman Boya Ustası
Tokat Lojistik
Yozgat Lojistik
Kastamonu Şehir İçi Nakliyat
Eryaman Parke Ustası
51DEB
ReplyDeleteQlc Coin Hangi Borsada
Kastamonu Lojistik
Kripto Para Nedir
Erzurum Lojistik
Kırıkkale Parça Eşya Taşıma
Antalya Parça Eşya Taşıma
Tekirdağ Fayans Ustası
Adana Lojistik
Ağrı Evden Eve Nakliyat
C113D
ReplyDeleteKwai Beğeni Satın Al
Binance Kimin
Ceek Coin Hangi Borsada
Görüntülü Sohbet Parasız
Threads Beğeni Hilesi
Coin Kazanma Siteleri
Okex Borsası Güvenilir mi
Facebook Grup Üyesi Satın Al
Floki Coin Hangi Borsada
gfhngfhjngjjk
ReplyDeleteشركة تسليك مجاري بالاحساء
شركة صيانة افران 4T42C9I6yq
ReplyDelete