Home page

Welcome to PHP Contact Form

Simple, High Quality Contact Form Scripts For Every Day Solutions

In a pinch to get that project done? Tired of searching the internet and downloading endless form scripts looking for a “simple” solution? Well Look no further.

I’ve been in your shoes before, and decided to put together some practical, easy to use contact forms that will get you up and running in no time. Fully customizable and will allow for any design through simple css variables, and you can manipulate the contact forms for use with any fields, checkboxes, radio buttons and select options you need with fully documented code and secured to prevent header injection and spam – for only $9.95 each, or buy all 8 for only $29.95

Plus with our complete satisfaction guarantee – if you have any questions, or issues with your script, just me know and I will personally assist you with getting it on your website for you.

Contact Form Features at a Glance
  • Quickly collect user information and have it sent to your email, without exposing your email address to the public and email harvesting applications.
  • Anti spam protection against header injection and malicious attacks.
  • No programming skills required. One line of text to edit and your ready to go.
  • Complete CSS design styles to make for easy changes to the look and feel.
  • No database is needed.
  • Simple and easy to understand to make customizing a breeze.
  • Fully customizable for any web page or flash file.
  • Completely unbranded, with no reference or links back to our site.
  • Its yours to do with whatever you want. Unlimited usage on unlimited sites.
  • Free support if you have questions or need assistance.
What Others Have To Say

“WOW! I have tried countless php forms for my site … none have worked very well, or required WAY too much user-programming. This is awesome! It worked the first try! I Love it! Thank you so much!”

Andrea K – Boulder, CO


“You saved my project just in the nick of time. I had downloaded more then a dozen form scripts and tutorials and none of them made any sense until I found yours. Very well documented and I got my form finished in 5 minutes. Client was very happy. Thanks again”

Chad L – Houston, TX


“After I downloaded your form, I still didn’t understand. Maybe its just too complex for me, but I really appreciate your speedy response in helping get it set up on my website. It looks great and works just as I expected. Thank you for a great product and great service.”

Robert P – Macon, GA


Feel free to contact me here and share your thoughts and experience with PHP Contact Form.

PHP contact form script with validation

This tutorial gives you guidance to create the PHP contact form script with validation. In the previous post, we have guide developing the PHP code to send email from contact form and have successfully created a simple contact form. But this contact form lacks the data validation step. As you know, the form you create will include a lot type of inputs such as text fields, radio buttons, a multiple-option select list, a checkbox, and a submit button. You need to validate those fields to ensure that customers enter a valid value. This article will help you to add validation to the PHP form

There have 2 ways to validate fields: using HTML 5 and using Javascript.

Validation contact form using HTML 5

When using HTML 5, a warning message will appear if a customer clicks on the Submit button while they do not fill in value for the required fields.

PHP contact form script with validation

You need to add this code into input tag: required=”” aria-required=”true”. Please refer to the below screenshot:

PHP contact form script with validation
Code HTML


<div class="contact-wapper">
<h2 class="title"><strong>Contact</strong> Us</h2>
<form id="contactForm" action="php/contact-form.php" method="POST" >
<div class="row">
<div class="form-group">
<div class="col-md-6">
<label>Your name *</label>
<input type="text" value="" maxlength="100" class="form-control" name="name" id="name" required="" aria-required="true">
</div>
<div class="col-md-6">
<label>Your email address *</label>
<input type="email" value="" maxlength="100" class="form-control" name="email" id="email" required="" aria-required="true">
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-12">
<label>Subject</label>
<input type="text" value="" maxlength="100" class="form-control" name="subject" id="subject" required="" aria-required="true">
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-12">
<label>Message *</label>
<textarea maxlength="5000" rows="10" class="form-control" name="message" id="message" required="" aria-required="true"></textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<input type="submit" value="Send Message" class="btn btn-primary btn-lg mb-xlg" />
</div>
</div>
</form>
</div>

Validate contact form using javascript

Developers usually use javascript for creating the PHP contact form script with validation because of multiple advantages. The data validation and processing are faster than using HTML 5 because it reduces the number of requests to the server. Besides, developers can easily add/remove classes and javascript event. An example of using javascript is as below contact form:

 

PHP contact form script with validation

In the HTML file, please add these codes:

PHP contact form script with validation

The content of the warning message can be put after the msg-error= code.

Please refer to the below code html


<div class="row">
<div class="form-group">
<div class="col-md-6">
<label>Your name *</label>
<input type="text" value="" msg-error="Please enter your name here." maxlength="100" class="form-control" name="name" id="name" required="" aria-required="true">
</div>
<div class="col-md-6">
<label>Your email address *</label>
<input type="email" value="" msg-error="Please enter your email address here." maxlength="100" class="form-control" name="email" id="email" required="" aria-required="true">
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-12">
<label>Subject</label>
<input type="text" value="" msg-error="Please enter your subject here" maxlength="100" class="form-control" name="subject" id="subject" required="" aria-required="true">
</div>
</div>
</div>

 

 

This is code javaScrip


jQuery('.btn-primary').click(function(){
  jQuery("#contactForm input").each(function() {
    if (jQuery(this).val() =="" ){
      jQuery(this).parent().append('<div class="red">'+jQuery(this).attr('msg-error')+'</div>');
   }
  });
})

Download code PHP contact form script with validation via html5  dowload code contact form here

Download code php contact form validation via javascript: php-code-to-send-email-from-contact-form-via-javascrip

 

php code to send email from contact form 2018

In our contact form serial, we will give you detailed instructions about developing PHP code to send email from contact form.

Your contact from will look like the screenshot

php code to send email from contact form

 

In this post, we will create a contact form with the similar layout. The purpose of this tutorial is making the PHP script sent email from web form and sending email function work correctly. If you want to change the contact form layout, you can put your style code into the style.css file in the style folder.

In order to create a contact form, we will need those file types:

  • HTML file (.html): HTML source codes are used for creating contact page layout such as displaying textbox, submit button, etc.
  • CSS file (.css): CSS codes are used for managing box position, font, font color, and so on.
  • PHP file (.php): PHP codes are used for data processing

Now, let’s get started to develop code send mail php for a simple contact form. One contact form usually includes these fields:

  • Username: A visitor needs to fill in his/her name in this field
  • Email: This field represents visitor’s email address
  • Subject: This field represents the email’s subject
  • Message: This field represents the content of the email
  • Submit button

These fields are necessary to create a simple php email form. You can add other fields to your contact form later.

If your website uses Prestashop platform, I strongly recommend that you should use the Form Builder module to create your unique contact form. You can check the module here: https://addons.prestashop.com/en/contact-forms-surveys/22563-form-builder-custom-contact-product-cms-quote-form.html

Step 1: Create HTML contact form: contactform.html


<div class="contact-wapper">
 <h2 class="title"><strong>Contact</strong> Us</h2>
 <form id="contactForm" action="php/contact-form.php" method="POST" >
 <div class="row">
 <div class="form-group">
 <div class="col-md-6">
 <label>Your name *</label>
 <input type="text" value="" maxlength="100" class="form-control" name="name" id="name" required="" aria-required="true">
 </div>
 <div class="col-md-6">
 <label>Your email address *</label>
 <input type="email" value="" maxlength="100" class="form-control" name="email" id="email" required="" aria-required="true">
 </div>
 </div>
 </div>
 <div class="row">
 <div class="form-group">
 <div class="col-md-12">
 <label>Subject</label>
 <input type="text" value="" maxlength="100" class="form-control" name="subject" id="subject" required="" aria-required="true">
 </div>
 </div>
 </div>
 <div class="row">
 <div class="form-group">
 <div class="col-md-12">
 <label>Message *</label>
 <textarea maxlength="5000" rows="10" class="form-control" name="message" id="message" required="" aria-required="true"></textarea>
 </div>
 </div>
 </div>
 <div class="row">
 <div class="col-md-12">
 <input type="submit" value="Send Message" class="btn btn-primary btn-lg mb-xlg" />
 </div>
 </div>
 </form>
</div>

Step 2: Style CSS for contact form: style.css

In the project folder, you have to create a new  styles folder. In this new folder, create a CSS file: style.css. Source code:


*{box-sizing: border-box;}

.col-md-6 {

width: 50%;

float: left;

padding: 0 15px;

}

.col-md-12{width:100%;float:left;padding:0 15px}

label {

display: inline-block;

max-width: 100%;

margin-bottom: 8px;

font-weight: bold;

}

.form-control {

display: block;

width: 100%;

height: 34px;

padding: 6px 12px;

font-size: 14px;

line-height: 1.42857143;

color: #555;

background-color: #fff;

background-image: none;

border: 1px solid #ccc;

border-radius: 4px;

-webkit-box-shadow: inset 0 1px 1pxrgba(0, 0, 0, .075);

box-shadow: inset 0 1px 1pxrgba(0, 0, 0, .075);

-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;

-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;

transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;

}

.form-group {

width: 100%;

float: left;

padding: 15px 0;

}

.contact-wapper {

width: 40%;

margin: auto;

}

h2.title {

padding: 0 15px;

}

textarea#message {

height: auto;

}

input.btn.btn-primary.btn-lg.mb-xlg {

color: #fff;

background-color: #204d74;

border-color: #122b40;

height: 30px;

border: none;

}

Go back to the contactform.html file, please put these codes inside the <header></header> tag:

<link type=”text/css” rel=”stylesheet” href=”style/style.css” />

Step 3: Write php code to send email from html contact from

Source code:


<?php

session_cache_limiter('nocache');

header('Expires: ' . gmdate('r', 0));

header('Content-type: application/json');

$to = 'you@domain.com';

$subject = $_POST['subject'];

if(isset($_POST['email'])) {

$name = $_POST['name'];

$email = $_POST['email'];

$fields = array(

0 =>array(

'text' => 'Name',

'val' => $_POST['name']

),

1 =>array(

'text' => 'Email address',

'val' => $_POST['email']

),

2 =>array(

'text' => 'Message',

'val' => $_POST['message']

)

);

$message = "";

foreach($fields as $field) {

$message .= $field['text'].": " . htmlspecialchars($field['val'], ENT_QUOTES) . "<br>\n";

}

$headers = '';

$headers .= 'From: ' . $name . ' <' . $email . '>' . "\r\n";

$headers .= "Reply-To: " .  $email . "\r\n";

$headers .= "MIME-Version: 1.0\r\n";

$headers .= "Content-Type: text/html; charset=UTF-8\r\n";

if (mail($to, $subject, $message, $headers)){

$arrResult = array ('response'=>'success');

} else{

$arrResult = array ('response'=>'error');

}

echojson_encode($arrResult);

} else {

$arrResult = array ('response'=>'error');

echojson_encode($arrResult);

}

?>

In order to change the received email address, you need to replace you@domain.com to the expected email address in this code line: $to = ‘you@domain.com’.

All are done. If you still have trouble in creating a contact form, please check our video instruction.

You can download code project PHP code to send email from a contact form here

In this tutorial, we use the default PHP mail function. This function works with almost all hostings, but if your hosting blocks it, you should contact them to enable it for your website or you can create PHP code to send email from contact form via SMTP.

 

Increasing the conversion rates by using a mobile app

As a matter of fact, your company success depends on your revenue. This interest is the rest money on your wallet after spending a lot of budget for marketing, advertising, and other miscellaneous fees. Thanks to those SEO actions, the number of shoppers visits your online store increasing dramatically. It means your products have more chance to sell, but it will be a problem if the sales number is not raising. From where I stand, I suggest some tips in order to improve this situation.

Solution

It can be clearly seen that e-commerce has entirely revolutionized retail in the last twenty years. Along with this, the development of smartphones, as well as public WiFi and mobile internet technologies have also changed the shopping habits of buyers. Statistics show that the number of sales which are purchased from mobile devices increases 50% while it’s just increased 17% by using their personal computer. People use their mobile phones almost all the time when they are in the office, the café, and in the bus. Your business should not only optimize mobile friendly but also create a mobile app to make customer’s shopping experience become more comfortable. A mobile app should have clearly user interface, limit advertisements, and only display necessary information for shoppers. It is said that the purchasing rate from mobile app increases more than 40% – compare with completing orders from mobile browsers via add to cart and contact from.

conversion rates by using a mobile app

Hard

But there is a fact that not all customers are willing to install your mobile app on their smartphones. There have several main factors about this problem. Firstly, they can access several stores at the same time with browsers, while can only visit one store if using an app. Moreover, clients will not put their devices in risk situation when installing a new app because there might have issues with transaction security or malware. I recommend some solutions to overcome this problem such as giving vouchers/discounts if they install your app, reviewing/sharing app to gain points, and so on.

Prestashop 1.7 reviews (2018)

What is Prestashop?

Launched in 2007, PrestaShop can be just a international cart software option. Nowaday – 2018 Together with greater than 270,000 shops internationally. Today I will give you Prestashop 1.7 reviews

A opensource cart application, also PrestaShop is wholly free to use and download. However, it does not imply that PrestaShop is really a zero-cost e-commerce solution. In case that you choose to download this program, you’re likely to want to pay for web hosting. You may also probably need to get a couple (usually pricey) modules to add various applications together side your site. In the event you’ve very little tech comprehension, you can consider investing in an internet developer that’ll support you cope with the rough locations.

PrestaShop may possibly be liberated, however in the event, you aren’t careful, it might find yourself being more pricey than some fully-hosted choices.

Stick-on to get a complete, unbiased inspection of PrestaShop.

View the movie below to Find a Quick Overview of PrestaShop. The picture was made for its preceding version of PrestaShop (we’re now on PrestaShop 1.7. X), however it is going to still provide you with a fantastic idea what you can expect.

Prestashop is Free

Though PrestaShop will not supply you with a free trial (why would they should their applications is now free?) They do have a very demonstration available. This demonstration provides you with a possibility to understand more regarding the admin and admin onto plenty of apparatus. Every thing’s already saturated in using sample advice, and which indicates you truly obtain yourself a wonderful awareness of how in which the application works on an everyday basis.

However, it’s likely to expect that a few additional prices for hosting (even though those should not be too bad). View PrestaShop’s recommended hosting partners.

Ongoing expenses vary according to an array of factors. PrestaShop isn’t the simplest program to work well with; it could be tough to organize, and modules usually restrict one another, leading to an overall glitchy site. In the event you don’t discover just how exactly to address technical issues on your own, you are likely going to need to hire internet developers, IT staff, and also web designers to accomplish the job for you personally.

Moreover, modules and add-ons usually come at a steep cost (after all, that’s the way PrestaShop makes their cash).

Benefits Of Prestashop

Since PrestaShop is totally free to download, there is no free trial available. But as I mentioned previously, there’s a demo online so that you can check it out without going through all of the hassles of downloading and implementing this software.

Setting up PrestaShop requires a little bit of time. You will want to download PrestaShop and make a database, then upload the software to an own server with an FTP client, after that install. It’s possible to have a peek at PrestaShop’s Getting Started webpage to learn more.

Here is the dashboard, you will be able to get as soon as you’ve implemented this software.

prestashop reviews dashboard

At this time you’re likely to should start to think of what platforms you would like to run your business. If you have very little tech experience, then it’d be smart to hire a professional to shop immediately after integrations for you. You also must have Prestashop custom fields module to custom user registration page.. Matters could come across just a tiny intricate. Fortunately, after you have got your site up and performing, everyday surgeries are quite simple. It will be likely to place up an item description, groups, amounts, and also search engine optimization attributes in the specific very same time that you put in that into an own shop. It’s offered from your toolbar under the title.

When it is potential to allow it to be throughout the very first setup from one’s store (integrations and modules included), you should function as correct handling the rest of the I counsel you just try this point all on your own personal. All you could have to complete is always to guide your own browser mechanically this absolutely functional presentation. That’s it. You don’t have to enroll in an endeavor, and also additionally you likewise don’t have to undergo some other installment wizards or tutorials. In addition to you’ll not obtain some calls out of profits reps.

PrestaShop 1.7 has 700+ features by now assembled in, and they comprise each one the fundamentals most merchants want to start. Take a glance at a couple of my favorite characteristics beneath.

Default theme design

The PrestaShop shop hosts over 3,500 fully responsive templates made by third-party designers. The only free solution is that the default theme that accompanies every platform.

Here is the Prestashop default themes:

prestashop reviews front end

Due to the fact PrestaShop is opensource, you have absolute accessibility for the particular code that has been used to build up your site. Now you (or your personal hired developers and artists) are certain to get on your ears and then customize the site to both checks and run exactly the method that you would like it to. Default theme looks great but everything is very simple. If you need custom you need download mega menu Prestashop. You also need a lot more custom to make your site unique.

Default theme has a enough contact form. But if you need a custom form you have to purchase a module or hire a developers.

In the event you don’t need access to tech skill, however, there’s really a WYSIWYG (what you find is just what you will get) editors available to produce alterations to an own default motif. With all the WYSIWYG editor you then can insert your symbol along with transform page layouts without even having any hint at all. You will possibly utilize the WYSIWYG editor to mechanically upgrade your web pages content material. With tens of thousands of integrations provided in PrestaShop’s add-ons market-place, you’re sure to comprehend exactly what your website demands. These integrations are seen as one-time purchases.

It’s appropriate that integrating such integrations to the own platform can acquire high priced, especially the moment you imagine of your alternatives. Lots of those modules have been by now incorporated into the additional absolutely hosted cart. And those carts regularly charge modest to mid-size retailers somewhere around £ 300 yearly for everybody (such as for instance hosting along with customer service). Thus, for several merchants, those entirely hosted choices can possibly be cheaper than obtaining handfuls of modules in PrestaShop. Around the reverse side, in the event that you’re attempting to sell high volume, then you definitely have turn outside as well to PrestaShop. It all is different. Besides the buy price tag, there is just another drawback to all those third-party modules; due to the fact these are made by numerous exceptional developers, they’re not guaranteed to interact. Adding numerous modules can lead to a glitchy site, additionally mainly because PrestaShop did not create the modules that they can’t fundamentally help when anything else goes wrong.

Customer Support

Support is more complex using an opensource program. Since most programmers assemble both the templates and modules available into this point, nobody completely knows each the intricacies of most of PrestaShop platforms. Service may not be optional; with boundless mixes of modules reachable, every single store is unique within its own particular makeup. Around the reverse side, opensource applications have its own advantages. PrestaShop hosts a diverse consumer community that arrives collectively to resolve problems via solutions and forums. Here’s the sort of services you’re ready to purchase with PrestaShop.

  • Forum comunication: Here is actually the consumer community I have been speaking about. Bonus: forums have been recorded in numerous languages.
  • Services: Employ web designers and programmers to incorporate modules to you, take good care of migration, track and correct your SEO, or even make a new theme on your shop.
  • PrestaShop Coaching: Contains classes that will assist you grasp the stage.
  • Social Media: you could also attempt to get PrestaShop through Facebook or even Twitter, but you should likely try other contact approaches.

Others favorable testimonials mention:

  • Mobile harmonious: This is true for both the admin as well as the admin.
  • Quick installation: Tech-savvy users report you could get online in only every day.
  • Documentation and manuals: Resources are all comprehensive.
  • Quick loading: Many retailers say that their websites load quicker on PrestaShop.
  • Great forum/community.

Safety

Concentrate on the word “prepared” Your PrestaShop shop won’t be PCI Compliant by itself. You are going to need to make sure yourself. In order to accomplish this, you ought to buy an SSL certificate. Read PrestaShop’s security guide.

Prestashop Pros

  • Free opensource to download & use
  • Highly customizable with PHP and Smarty
  • Integrated with a lot of platform: Amazon, PayPal…
  • Powerful user community
  • Alot of free modules

Prestashop Cons

The last

PrestaShop isn’t for the newcomer. However, if you are reasonably comfortable with HTML, CSS, and PHP (or is able to employ a programmer) you may discover that PrestaShop matches your company’s requirements. As open source software, it is highly customizable. It includes a huge feature set right from this box, and there is an ever-expanding choice of add-ons to select from.

5 Ways to Improve Checkout Conversion Rates

Nowadays, online shopping is on the rise because of the rapid expansion of the Internet and use of mobile devices in the market. A lot of store owners spends so much money on advertising and marketing but its revenues and income don’t increase as expected. The number of website visitors raises while the number of real customers are not. It is reported that around 70% new customers are not completing their purchases online, and they will leave and never comeback. But every problem is an opportunity. In this post, we share some tips to improve and avoid them.

1 Do not distract your customers

Firstly, you should make the purchasing process as simple as possible. A lot of buyers refuse from a purchase because of a too frustrating and long checkout process. Secondly, please eliminate hyperlinks in a cart and any advertisements which could stop shoppers from completing orders. Those distractions can be really harmful for your sales.

abandoned cart reminder

2 Provide crystal-clear images and purchasing processes as well as gain customer’s trust

You should let customers know exactly about your checkout process by integrating a purchase progress indicator. Besides, please use trust signals such as use reviews of satisfied customers and sign up https for your website to increase the customer’s confidence about the security transaction. Last but not least, please enhance your customer support service. You can provide live chat, contact form ,  community forums, and more in order to give them confidence to move further.

abandoned cart reminder

3 Gather email addresses

In the very first ordering steps, please try to collect your customer email addresses at the start. If they can’t complete the purchase for some reasons, you can send them an email to remind about their abandoned carts.

abandoned cart reminder

 

4 Display warning message when visitors leave website

When they decide to leave your website, the possibility to buy products are reduced. You should let them know that these products might not be available when they come back to purchase by showing up a warning message.

5 Use tools

As a matter of fact, there exist huge amount of abandoned carts that we can’t avoid; so we should use some tools to improve the situation. Abandoned cart reminder is a powerful module which can send reminder emails for your customers anytime. You can offer them discount codes and the free shipping option in that reminder emails. This module also have reminder popups as well as browser notification which can be displayed even when they are not visiting your store.

abandoned cart reminder

 

Hope that this post helps you in increasing your sales. Let us know your good news!

8 Reasons abandonment cart – Why your customer didn’t complete their purchase?

A huge amount of customers visit your store but don’t purchase any products. This typical problem does not only happen on the physical store but also on your online shop. There exist multiple reasons for not purchasing products when visiting an e-commerce website. Throughout this post, you can figure out those reasons and solutions to fix them in order to have more potential customers and increase your revenue.

Do you know why shoppers don’t complete their order?

High unexpected shipping costs

When people add products to cart, they make a guess about the shipping fee and nothing more. If the shipping cost is somehow higher than the average, and you add additional fee which doesn’t appear until after the checkout process begun, your customer will go away for sure. Do you agree that you are not willing to purchase a pen (cost: $1 USD), but have to pay $4 USD for shipping?
High unexpected shipping costs

Frustrating and long checkout process

People can leave the checkout process anytime if there have multiple steps in checkout which make them feel really frustrating. Please make it as simple as possible because no customers want to waste their precious time. You should only ask for necessary information. Please, don’t require your client to fill in their identification card if they just want to purchase a bulb. Don’t make your check out form too complicate!

Lacking wide selections of payment options

Many businesses don’t realize the importance of providing different payment methods to their clients. For example,you familiar with PayPal doesn’t mean your customer would prefer to pay via PayPal. From where I stand, I would recommend the cash on delivery (COD) payment option. By using this method, your client is able to check their products before making payment. There would have some cases that your customers refuse to complete this order, but believe me, your revenue will be increased incredibly.

Lack of cost in details

A lot of e-commerce stores don’t put enough product information (especially product price and other additional prices) on their website. As a matter of fact, buyers will go elsewhere until they found those details, and that means you lost your potential clients just in a second. So, you need to be crystal-clear about the overall costs from cart to the checkout process.

Require registration before purchasing

I understand that some platforms require shoppers to create an account when purchasing by default. It helps your business in collecting customer’s database and advertisement purpose. But it is really annoying to buyers if they have to provide a lot of information in a lengthy registration form. In this case, you should ask your website developer to provide “Guest checkout” option or signing up with social networks (Facebook, Gmail, and so on).

Lack of concerning about website errors, mobile friendly, and secure transaction

A lot of visible website errors includes: impossible to click on basket icon and checkout, broken style, or extremely slow loading time could prevent shoppers from purchasing. You must also take into consideration about optimizing mobile interface because a nearly half of all orders are being completed from mobile devices.Focusing on the customer experience is paramount.Last but not least, please make sure about payment security – that’s major concern when making an online transaction. Please keep your website SSL certificates up-to-date.

Lack of return policy

Along with secure customer’s information and secure transaction, you should make your customer feel confident about their purchase by giving them a satisfied return policy. You can put the return policy in the final checkout step to boost buyer’s trust.

Do not use tools to remind shoppers about their abandoned carts

Customers can be distracted from the middle of purchasing progress because of multiple reality reasons. They might have a phone call, electricity suddenly cut off, or making a comparison between other competitor sites. In these cases, you should remind them by sending reminder emails, browser notifications, remind popup, sending voucher code, or offering free shipping. I strongly recommend a powerful tool called “Abandoned Cart Reminder”. This module is also called as “Prestashop Abandoned Cart Reminder” because it’s developed with Prestashop platform. Currently, there have 2 module versions which are compatible with Prestashop version 1.6 and 1.7.

Good luck with your business!

How to Make a PHP Contact Form

Getting Started with the Basics of How a Contact Form is Built and Processed with PHP

To make a basic contact form with php, we first need to have a standard html form to collect the information from the user. For this example we will create a form with a text field for people to enter their email address for use in a mailing list.

<form action="yourfile.php" method="post">
<input name="emailaddress" type="text" size="40">
<input type="submit" name="Submit" value="Submit">
</form>


Which would produce this ...

Note the forms action to post to the file "process.php". Also note the text field name, as we will be using this to convert to php. So now we need to move on and create that file to process the form and send it to your email.

Next

Processing Form Fields With PHP

How to Use PHP to Process and Handle Variables From Your Contact Form Fields

So now that we have our form set up, we need to process it and control what happens to the form data. The first step is to convert the variables of your form fields to something that is understood by php.

$email = $_POST[“emailaddress”];

This is converting the name of your text field “emailaddress” to the php equivalent “$email”. So what this will do is anytime you place “$email” in the file, it will produce whatever was entered into that form field. Now we need to add items to mail the results.

$to = “you@youremail.com”;
$subject = “New Email Address for Mailing List”;
$headers = “From: $email\n”;$message = “A visitor to your site has sent the following email address to be added to your mailing list.\nEmail Address: $email”;

Now you have indicated who will receive the form information. The subject line, and who its from. Notice how in the from area it calls “$email” … this will post the email address entered in the form.

We also added a small message, and the email address again.

The last step is to actually mail the information, and we do that using this line of code.

mail($to,$subject,$message,$headers);

So here is the full code for the “process.php” page to take the text field of your form, convert to php, and send the data to your email.

<?PHP
$email = $_POST[“emailaddress”];

$to = “you@youremail.com”;
$subject = “New Email Address for Mailing List”;
$headers = “From: $email\n”;

$message = “A visitor to your site has sent the following email address to be added to your mailing list.\n

Email Address: $email”;

mail($to,$subject,$message,$headers);

?>

 

Previous | Next

Using PHP To Send Contact Form Confirmation Emails

Send Your Contact Form Users a Message or Confirmation

By following the first 2 little articles you now have a simple form to collect an email address from your visitors, process the form with PHP and email you the data. But what if you want to send your visitor a confirmation email? The easiest way to do this is simply create another area of your code to send them the message like this.


$user = "$email";
$usersubject = "Thank You";
$userheaders = "From: you@youremailaddress.com\n";

$usermessage = "Thank you for subscribing to our mailing list.";

Then set the code to mail that information.

mail($user,$usersubject,$usermessage,$userheaders);

So here is the full code for the "process.php" page to take the text field of your form, convert to php, and send the data to your email AND send confirmation to your user.


<?PHP
$email = $_POST["emailaddress"];

$to = "you@youremail.com";
$subject = "New Email Address for Mailing List";
$headers = "From: $email\n";

$message = "A visitor to your site has sent the following email address to be added to your mailing list.\n

Email Address: $email";

$user = "$email";
$usersubject = "Thank You";
$userheaders = "From: you@youremailaddress.com\n";

$usermessage = "Thank you for subscribing to our mailing list.";

mail($to,$subject,$message,$headers);

mail($user,$usersubject,$usermessage,$userheaders);

?>

 

Previous | Next

Creating a Contact Form Thank You Page and Redirect Using PHP

Send Your Users to a Custom Thank You Page Once Their Form Has Been Submitted

Because your form action is calling a separate page for processing rather then using itself (we will cover that later), you need to somehow let your visitor know that information has been sent.

To do this, you can pretty much use any html page with text as you normally would, and just place the php code at the top of the page. So for example, if you want to say something like “Thank You, Your information Has Been Submitted”. You would put your php at the top like this …

Click Here to have me build your custom contact form for you

Then the html below would look like this …

<html> <body> <table width="400" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center">Thank You, Your Information Has Been Submitted</div> </td> </tr> </table> </body> </html>


So here is the full code for the "process.php" page to show the thank you message when they submit their form. Keep in mind that the page still has to have a .php extension for your form to process correctly. It will still read the html just fine.


<?PHP
$email = $_POST["emailaddress"];

$to = "you@youremail.com";
$subject = "New Email Address for Mailing List";
$headers = "From: $email\n";

$message = "A visitor to your site has sent the following email address to be added to your mailing list.\n

Email Address: $email";

$user = "$email";
$usersubject = "Thank You";
$userheaders = "From: you@youremailaddress.com\n";

$usermessage = "Thank you for subscribing to our mailing list.";

mail($to,$subject,$message,$headers);

mail($user,$usersubject,$usermessage,$userheaders);

?>


<html>
<body>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="center">Thank You, Your Information Has Been Submitted</div>
</td>
</tr>
</table>
</body>
</html>


Or, if you prefer to redirect them to a new page and keep the process.php script completely separate and simply send them to a thank you page after the process has taken place, just put this redirect command after the mail function within your php script.


header("Location: thankyou.html");