Sanwebcorner | Programming Blog

Circular tab menu using CSS and JavaScript

Today we will see how to create circle type tab menu using css and JavaScript. This is is very useful to show the tab menu in different way. This is one of the attractive tab menu for web pages.



Find the source code below to create circular tab menu. And also i given the download button to download the full source code, and also i provided the demo link to check how the circular tab menu is working. I hope this code is very useful.

 Code for circle tab menu:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Circle Tab menu using css and javaScript</title>
<link href="style.css" type="text/css" rel="stylesheet">
<script src="jquery.js" ></script>
</header>
<body>

<div class ='hidden' id="menu1"> 
<h1>Forecast</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris gravida justo nec vehicula auctor. Nulla facilisi. Fusce id magna vitae sapien bibendum tristique rutrum id neque. Sed luctus consequat rutrum. Maecenas non mollis tortor, sit amet vestibulum libero.</p>
</div>
<div class ='hidden' id="menu2">
<h1>Automation</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris gravida justo nec vehicula auctor. Nulla facilisi. Fusce id magna vitae sapien bibendum tristique rutrum id neque. Sed luctus consequat rutrum. Maecenas non mollis tortor, sit amet vestibulum libero.</p>
</div>
<div class ='hidden' id="menu3">
<h1>Procurement</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris gravida justo nec vehicula auctor. Nulla facilisi. Fusce id magna vitae sapien bibendum tristique rutrum id neque. Sed luctus consequat rutrum. Maecenas non mollis tortor, sit amet vestibulum libero.</p>
</div>
<div class ='hidden' id="menu4">
<h1>DigiPos</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris gravida justo nec vehicula auctor. Nulla facilisi. Fusce id magna vitae sapien bibendum tristique rutrum id neque. Sed luctus consequat rutrum. Maecenas non mollis tortor, sit amet vestibulum libero.</p>
</div>
<div class ='hidden' id="menu5">
<h1>Online Ordering</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris gravida justo nec vehicula auctor. Nulla facilisi. Fusce id magna vitae sapien bibendum tristique rutrum id neque. Sed luctus consequat rutrum. Maecenas non mollis tortor, sit amet vestibulum libero.</p>
</div>
<div class ='hidden' id="menu6">
<h1>Contactless Dine-IN</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris gravida justo nec vehicula auctor. Nulla facilisi. Fusce id magna vitae sapien bibendum tristique rutrum id neque. Sed luctus consequat rutrum. Maecenas non mollis tortor, sit amet vestibulum libero.</p>
</div>
<nav class="menunav">
<ul class='circle'>
<li class='coconut light slice'> <!-- Menu labels -->
<label for='ococonut' class='circle over' id="1">Forecast</label>
</li>
<li class='vanilla light slice'>
<label for='ovanilla' class='circle over' id="2">Automation</label>
</li>
<li class='orange light slice'>
<label for='oorange' class='circle over' id="3">Procurement</label>
</li>
<li class='almond light slice'>
<label for='oalmond' class='circle'><span class="over" id="4">DigiPos</span></label> <!-- Some menu labels have to be flipped with a span -->
</li>
<li class='grape light slice'>
<label for='ogrape' class='circle'><span class="over" id="5">Online Ordering</span></label>
</li>
<li class='blackberry dark slice'>
<label for='oblackberry' class='circle' ><span class="over" id="6">Contactless Dine-IN</span></label>
</li>
<li class='unsel circle'>
<label for='unsel' class="clicky menuname">Our Solutions</label>
</li>
<li class='middle circle'></li>
</ul>
</nav>
<script type="text/javascript" src="javaScript.js"></script> 
</body>
</html>


Simple Parallax Effect using css

How to create simple parallax animation using css

Here we will see how to create simple parallax animation effect while scrolling the web page. This animation is commonly used in the webpages. It is really simple and nice to see the effect it will attract the customers. We will achieve this effect using simple css code, we will see how to do this animation

Simple-Parallax-Effect-using-css



create a css class and give the below code for this class , the following css code will be given the parallax effect. This is the background image trick, use background image and set background size is cover and the background-attachement is fixed then overflow is hidden then will get this effect.

   position: relative;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top !important;
    background-size: cover;
    background-image: url(1.jpg);

I hope this simple parallax animation effect is very useful to you to integrate the webpages. This parallax effect really helpful to the webapages.

Css code for parallax effect:

html, body
{
padding:0px;
margin:0px;
}
.cssparallax1 {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top !important;
    background-size: cover;
 background-image: url(1.jpg);
}


.cssparallax2 {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top !important;
    background-size: cover;
 background-image: url(2.jpg);
}


.cssparallax3 {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top !important;
    background-size: cover;
 background-image: url(3.jpg);
}


.cssparallax4 {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top !important;
    background-size: cover;
 background-image: url(4.jpg);
}

section
{
height:550px;
}

Html code for parallax effect:

<section class="cssparallax1">  </section>

<section class="cssparallax2">  </section>

<section class="cssparallax3">  </section>

<section class="cssparallax4">  </section>

Download selected file in zip format using php form

Hi friends now we will see how to download user selected files from php form in zip file format. In this example I used 3 different dummy files for download, format of this files are file1 php format, file2 doc format, file3 image format. This files I saved in the folder name called as a files. I stored all this option files in the array name called as a lang[]. I used get method this php form to get the user selected files. I stored the zip file in temp path.

I provided full code here you can modify this in your way. Visit the live demo then you will get an idea how it is working. You can download the files by clicking download button below. I hope this Download selected file in zip format using php form example will help you.




Code for download zip file format for selected file:


<!DOCTYPE html>
<html lang="en">
<head>
<title>Download selected file in zip format using php form</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<style>

.container {
max-width: 500px;
width:100%;
margin: 100px auto;
display: block;
background-color: #ffc107;
padding: 40px;
border: 1px solid #cc9b09;
border-radius: 22px;
}

.sanf
{
margin-right: 40px;
font-size: 18px;
}

[type=button]:not(:disabled), [type=reset]:not(:disabled), [type=submit]:not(:disabled), button:not(:disabled)
{
background-color: #b78d0f;
border: 0px;
padding: 10px 25px;
margin: 18px auto;
width: 250px;
display: block;
color: #fff;
font-weight: bold;

}
</style>
</head>
<body>


<div class="container">
<!-- Control the column width, and how they should appear on different devices -->
<form method="GET" action=""  class="form-group">
<div class="form-group"> <input type="text" placeholder="Enter your name" class="form-control"  /></div><br/>
<div class="checkbox">
<p><span> <strong>Select Your Files</strong></span></p>
<span class="sanf"><input type="checkbox" name='lang[]' value="file1.php" > File1 </span>
<span class="sanf"><input type="checkbox" name='lang[]' value="file2.docx"> File2 </span>
<span class="sanf"><input type="checkbox" name='lang[]' value="file3.png" > File3  </span><br/><br/>
<input type="submit" value="Submit" name="submit" >
</form>
</div>
</div>
</body>
</html>

<?php
$error = ""; //error holder

$post = $_GET;
$file_folder = "files/"; // folder to load files
if(extension_loaded('zip'))
{
// Checking ZIP extension is available
if(isset($post['lang']) and count($post['lang']) > 0)
{
// Checking files are selected
$zip = new ZipArchive(); // Load zip library
$zip_name ="Download.zip"; // Zip name
if($zip->open($zip_name, ZIPARCHIVE::CREATE)!==TRUE)
{
// Opening zip file to load files
$error .= "* Sorry ZIP creation failed at this time";
}
foreach($post['lang'] as $file)
{
$zip->addFile($file_folder.$file); // Adding files into zip
}
$zip->close();


if(file_exists($zip_name))
{

// push to download the zip
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="'.$zip_name.'"');
readfile($zip_name);
// remove zip file is exists in temp path
unlink($zip_name);
}

}
else
$error .= "* Please select file to zip ";
}
else
$error .= "* You dont have ZIP extension";

?>

WishList Heart Animation on Click

Today will see one interesting animation using simple html and css, Heart shape change animation on click event this animation is very useful for anything especially for wishlist. This animation is fully play with background property. In this main thing is heart shape image. Please check the code below and check the live demo how it is working... You can download the file by clicking the download button below. I hope this example is very useful to you.



WishList Heart Animation on Click


<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>onclick wishlist heart animation</title>
  <style>
.heart {
  width: 100px;
  height: 100px;
  background: url("heart.png") no-repeat;
  background-position: 0 0;
  cursor: pointer;
  transition: background-position 1s steps(28);
  transition-duration: 0s;
}
.heart.is-active {
  transition-duration: 1s;
  background-position: -2800px 0;
}



.stage {
  position: fixed;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}
</style>
</head>
<body>

<div class="stage">
  <div class="heart"></div>
</div>

  <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
  <script>
  $(function() {
  $(".heart").on("click", function() {
    $(this).toggleClass("is-active");
  });
});
  </script>

</body>
</html>

Simple Html Paypal Integration Form

Now we will see how to create html donation form using paypal. This is very simple for that you need one paypal account then you can create a html form. But you need to pass the paypal required parameter values. Now we can see what all are the parameter requrired by paypal



1. item_name

2. item_number

3. amount

4. Shipping values

5. currency_code

6. CustomerName

7. CustomerEmail

You will give those values in the form, you can pass the some values in the hidden field also. In this example you can see the code some of the values i given in the hidden field. This is not only a donation form you can use it for your product also. Now this form is in sandbox mode if you want live mode change form action from https://sandbox.paypal.com/cgi-bin/webscr url to https://www.paypal.com/cgi-bin/webscr This example have the demo you can check it out in the damo link and you can also download full code by clicking the download button below. I hope this example is very useful to you.

Html Paypal Form:

<html>
<head>
<title></title>
<style>
.sanform
{
   width: 400px;
    background-color: #FFC107;
    padding: 25px;
    margin: 0 auto;
}

input, select{
width: 400px;
    height: 40px;
}

input[type="submit"]
{
background-color: #82640a;
    border-color: #82640a;
    color: #fff;
}
</style>
</head>
<body>

<form action="https://sandbox.paypal.com/cgi-bin/webscr" method="post" class="sanform">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="sanwebcorneronline@gmail.com">
    <strong>Donation / Contribution? </strong><br />
    <select name="item_name">
      <option value="Donation">Donation</option>
      <option value="Contribution">Contribution</option>
    </select><br />   <br />

    <strong>Which tutorial are you donating for?</strong><br /> 
    <select name="item_number">
      <option value="PayPal Form Tutorial">sanwebcorner.com</option>
      <option value="Amazon S3 Tutorial">sanwebtutorial</option>
      <option value="Some Other Tutorial">others</option>
    </select>
    <input type="hidden" name="amount" value="200" >
    <input type="hidden" name="no_shipping" value="0">
    <input type="hidden" name="no_note" value="1">
    <input type="hidden" name="currency_code" value="USD">
<input value="CustomerName" name="on0" type="hidden">
<input value="CustomerEmail" name="on1" type="hidden">
<br /><br />
<div class="first_name_invoice_payment">
    <strong>First/Last name (required)</strong> <br />
    <input value="" name="os0" required>
</div>
<br />
<div class="email_invoice_payment">   
   <strong> Email (requiered)</strong><br />
    <input value="" name="os1" required>
</div>

    <input type="hidden" name="return" value="http://www.sanwebcorner.com/">

    <br /><br />
    <input type="submit" value="Pay with PayPal!">
</form>
</body>
</html>


Live JavaScript Form Validation

Now will see how to create a from with user friendly live validation using JavaScript and bootstrap. Here i just created a from contains three field namely Name, Email, Password field. In the name field i did validation like it should allows only alphabets it should not contain any number or special character. If you type a number or any special character in the name field immediately it will show the validation error because i used keyup function for validation.

In the same way the Email should be email format and Password should be 6 to 16 character. Must contain one letter, one number, one special character. If you use some other combination it shows the validation error. This concept is very useful and it is user friendly , in the field itself the user get to know how the field should be, No need to click submit button.





This example have the live demo link, Just click the link you will see how the validation will work. And also download the code by clicking the download button i given full code there you can modify and use it to your projects. I hope this concept is very useful.

Bootstrap form:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Live User friedly Validation. Bootstrap</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

</head>
<body>

<div class="container">
  <h2>Live User friedly Validation.</h2>
  <form action="#">
    <div class="form-group">
      <label for="Name">Name: (try to Enter Special character)</label>
      <input type="text" class="form-control Name" required id="Name" placeholder="Enter Name" name="Name">
    </div>
   
      <div class="form-group">
        <label for="email">Email:</label>
        <input type="email" class="form-control" required id="email" placeholder="Enter email" name="email">
      </div>
    <div class="form-group">
      <label for="pwd">Password:</label>
      <input type="password" class="form-control" required id="pwd" placeholder="Enter password" name="pswd">
    </div>
    <button type="submit" class="btn btn-primary">Submit</button>
  </form>
</div>

</body>
</html>

Javascript code for Validation

<script>
$('.Name').keyup(function() {
    $('span.error-keyup-2').remove();
    var inputVal = $(this).val();
    var characterReg = /^\s*[a-zA-Z,\s]+\s*$/;
    if(!characterReg.test(inputVal)) {
        $(this).after('<span class="error error-keyup-2" style="color:red">No special characters and numbers allowed.</span>');
    }
});


$('#email').keyup(function() {
    $('span.error-keyup-7').remove();
    var inputVal = $(this).val();
    var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,8})?$/;
    if(!emailReg.test(inputVal)) {
        $(this).after('<span class="error error-keyup-7" style="color:red">Invalid Email Format.</span>');
    }
});



$('#pwd').keyup(function() {
    $('span.error-keyup-8').remove();
    var inputVal = $(this).val();
    var emailReg = /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{6,16}$/;
    if(!emailReg.test(inputVal)) {
        $(this).after('<span class="error error-keyup-8" style="color:red">Password should be 6 to 16 character. Must contain one letter, one number, one special character.</span>');
    }
});
</script>


Auto Hide Alert Box using Bootstrap and Jquery

 Today we are going to see how to create auto hide alert box. This type of auto alert box is useful when you display message on any of the user activities. This is user friedly it automatically close the alert box based on the time you set. It also contain the close icon to manually close the alertbox by clicking close button.

 This alert box responsive one because we are using bootstrap framework. This auto close alert box created by using bootstrap and jquery. Here is the demo page you can see the live demo by click demo button below. You can download the code and use it. I hope this is very simple and very useful to you.


Auto Hide Alert box using Bootstrap:

<!DOCTYPE html>
<html>
<head>
<title> Auto Hide Alert box using Bootstrap</title>
<style>
.alert
{
max-width:500px;
margin:0 auto;
margin-top:50px;
}

.san-button
{
    background-color: #009688 !important;
    color: #fff !important;
    width: 161px;
    margin: 0 auto;
    display: block !important;
}
</style>
</head>
<body>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" />

<div class="product-options">
  <a id="myWish" href="javascript:;" class=" san-button btn btn-mini">Click for Alert box </a>
</div>
<div class="alert alert-success" id="success-alert">
  <button type="button" class="close" data-dismiss="alert">x</button>
  <strong>Success! </strong> Product have added to your wishlist.
</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
  $("#success-alert").hide();
  $("#myWish").click(function showAlert() {
    $("#success-alert").fadeTo(2000, 500).slideUp(500, function() {
      $("#success-alert").slideUp(500);
    });
  });
});
    </script>
</body>
</html>

Multi Select Checkbox jquery and Bootstrap


Now we will see how to create dropdown muliple select with checkbox. bootstrap multiselect.js is convert the normal select box to multi select box with select all button. the select all button used to select the all values and return the values. Using keyboard and mouse you can select the muliple check box in the dropdown.

Below example shows you How to use Checkbox inside Select Option. This example have the full source code and demo link. check out the example and demo link and code. I hope this example really helpful.




Multi Select Checkbox Code:

<html>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
<link href="http://cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/css/bootstrap-multiselect.css" rel="stylesheet" type="text/css" />
<script src="http://cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/js/bootstrap-multiselect.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#lstFruits').multiselect({
includeSelectAllOption: true
});

$('#btnSelected').click(function () {
var selected = $("#lstFruits option:selected");
var message = "";
selected.each(function () {
message += $(this).text() + " " + $(this).val() + "\n";
});
alert(message);
});
});
</script>
<body>
<select id="lstFruits" multiple="multiple">
<option value="1">Mango</option>
<option value="2">Apple</option>
<option value="3">Banana</option>
<option value="4">Guava</option>
<option value="5">Orange</option>
</select>
<input type="button" id="btnSelected" value="Get Selected" />
</body>
</html>

How to create whatsapp link for website


Now a days WhatsApp is one of the important Messenger. Lot of peoples using WhatsApp Messenger so it is important to add whatsapp link to the website. Now will see how to add the whatsapp link to social media icon. when you add this link to site client directly will chat with your whatsapp number using your whatsapp number. Now we can see how to link this to website. Below is the code to link the whatsapp to website. You just use the code and link it to your website. Below code you can change your number from the below code.

whatsapp-link-for-website



Html code for whatsapp link

<html>
<head>
<title>How to create whatsapp link for website  </title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>


<i class="fa fa-whatsapp" aria-hidden="true"></i> <a class="btn-fill btn-blue sanbg" href="https://api.whatsapp.com/send?phone=919902142421&amp;text=Hi there! I have a question :)">Send Message</a>

</body>
</html>

Screenshots


whatsapp-social-link-website

whatsapp-website-link

Multiple File Upload in PHP


In this article we will see how to upload multiple files in php. It is possible to upload multiple files in single input upload field using html and php. After upload will send the data and uploaded files to the particular email id using the php mailer. First you need to create html form with the required fields and you should add the enctype="multipart/form-data" to the form to accept upload and add post method to form.

Then set action to "mail-send.php" file. Here you can write the code to send the form fields data to mail using php mailer. Here you can set the loop for multiple attachments. This example is working fine and i given complete code to your reference and also i given the demo link for this example. Click the demo link and check it out the result of this example.


index.php

<html>
<head>
<title>Upload multiple files in php form at a time</title>
<link rel="stylesheet" type="text/css" href="swc.css">
<script src="jquery-3.2.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function (e){
$("#sanForm").on('submit',(function(e){
e.preventDefault();
$('#loader-icon').show();
var valid;
valid = validateContact();
if(valid) {
$.ajax({
url: "mail-send.php",
type: "POST",
data:  new FormData(this),
contentType: false,
cache: false,
processData:false,
success: function(data){
$("#mail-status").html(data);
$('#loader-icon').hide();
},
error: function(){}      

});
}
}));

function validateContact() {
var valid = true;
$(".formfield").css('background-color','');
$(".info").html('');
$("#u_name").removeClass("invalid");
$("#u_email").removeClass("invalid");
$("#subject").removeClass("invalid");
$("#comment").removeClass("invalid");

if(!$("#u_name").val()) {
$("#u_name").addClass("invalid");
        $("#u_name").attr("title","Required");
        valid = false;
}
    if(!$("#u_email").val()) {
        $("#u_email").addClass("invalid");
        $("#u_email").attr("title","Required");
        valid = false;
    }
    if(!$("#u_email").val().match(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/)) {
        $("#u_email").addClass("invalid");
        $("#u_email").attr("title","Invalid Email");
        valid = false;
    }
if(!$("#subject").val()) {
$("#subject").addClass("invalid");
        $("#subject").attr("title","Required");
valid = false;
}
if(!$("#comment").val()) {
$("#comment").addClass("invalid");
        $("#comment").attr("title","Required");
valid = false;
}

return valid;
}

});
</script>
</head>
<body>
<form id="sanForm" action="" method="post" enctype='multipart/form-data'>
<div id="loader-icon" style="display: none;">
    <img src="ajax-loading-icon.gif" style="width: 85px;"/>
</div>
    <div id="mail-status"></div>
    <div>
        <input
            type="text" name="u_name" id="u_name"
            class="formfield" placeholder="Name">
    </div>
    <div>
        <input type="text" name="u_email" id="u_email"
            class="formfield" placeholder="Email">
    </div>
    <div>
        <input type="text" name="subject" id="subject"
            class="formfield" placeholder="Subject">
    </div>
    <div>
        <textarea name="comment" id="comment" class="formfield"
            cols="60" rows="6" placeholder="comment"></textarea>
    </div>
    <div>
        <label>Attachment</label><br /> <input type="file"
            name="attachment[]" class="formfield" multiple="multiple">
    </div>
    <div>
        <input type="submit" value="Send" class="san_button" />
    </div>
</form>
</body>
</html>

mail-send.php

<?php
require('phpmailer/class.phpmailer.php');
require 'phpmailer/PHPMailerAutoload.php';
$mail = new PHPMailer();
$mail->Mailer = "mail";
$mail->SMTPDebug = 1;
$mail->SMTPAuth = TRUE;
$mail->SMTPSecure = "tls";
$mail->Port     = 587;
$mail->Username = "Your username";
$mail->Password = "Your password";
$mail->Host     = "Your Host";
$mail->Mailer   = "smtp";
$mail->SetFrom("From Email", "website");
$mail->AddReplyTo($_POST["u_email"], $_POST["u_name"]);
$mail->AddAddress("To Email");
$mail->Subject = $_POST["subject"];
$mail->WordWrap   = 80;
$message='';
$message.="Name  : ".$_POST['u_name']." <br/>";
//$message='';
$message.="Email  : ".$_POST['u_email']." <br/>";
$message.="Subject  : ".$_POST['subject']." <br/>";
$message.="Email  : ".$_POST['comment']." <br/>";
$mail->MsgHTML($message);

foreach ($_FILES["attachment"]["name"] as $k => $v) {
    $mail->AddAttachment( $_FILES["attachment"]["tmp_name"][$k], $_FILES["attachment"]["name"][$k] );
}

$mail->IsHTML(true);
if(!$mail->Send()) {
echo "<p class='error'>Problem in Sending Mail.</p>";
} else {
echo "<p class='success'>Mail Sent Successfully.</p>";
}
?>



Multi File upload result screenshot:

Labels

360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap Bootstrap form validation border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll create random number Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed donation form download zip email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient heart animation hide menu Horizontal News ticker Hover Htm Html html dropdown html form html form validation html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript javascript validation Jquery jquery validation js Layered image effect on mouse hover lock & unlock page scroll marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form multi-select-checkbox Multi-Step-form Multiple File Upload in PHP mysql News ticker on hover change text to image our team page password generator password strength checker paypal form paypal html form Photoshop PHP php mailer populate html selectbox Popup image on click the link pure css Question type form random number generate Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image selectbox based on select box simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips whatsapp link website Whislist Youtube