PurabTech is technical blog for Programmer and Coders
How to create contact us template page in wordpress
Dont use the plugins for contact us page in wordpress which will and unwanted code to your site.we given the simple code snippet for create contact us template page in wordpress.
create contact us template page in wordpress
Contact us page is important for every website. Many wordpress developers use the contact7 wordpress plugin for creating the contact page.
Dont use the plugins for contact us page in wordpress
If you use any contact us plugin then your site became little bit slow. because due to database custom quires you will some bandwidth. My suggestion is use simple php code for that.
You need to just create the contact.php page in your wordpress theme folder and put the following code in that file.
$error.= "<p>Please enter a valid email address</p>";
12
}
13
if(!trim($_POST[your_message])){
14
$error.= "<p>Please enter a message</p>";
15
}
16
if(!trim($_POST[your_subject])){
17
$error.= "<p>Please enter a message</p>";
18
}
19
if(!$error){
20
$email= wp_mail(get_option("admin_email"),trim($_POST[your_name])." sent you a message from ".get_option("blogname"),stripslashes(trim($_POST[your_message])),"From: ".trim($_POST[your_name])." <".trim($_POST[your_email]).">\r\nReply-To:".trim($_POST[your_email]));
How do I send this information to a databse instead – basically I would like to send to database, receive a notification and also send email to the person that contact me. Could this be achieved at one go? Thanks!
Great wordpress hack for creating contact us page
How do I send this information to a databse instead – basically I would like to send to database, receive a notification and also send email to the person that contact me. Could this be achieved at one go? Thanks!
this works great thank you, but in the boxes appears the code. how do i stop the code form shoing the the boxes?
Ԝonderfuսlly writtren peice wigh gopd pointѕ through out.
Congraulations yooս now have a regullar νisitor haha