Skip to main content

Posts

Send Multiple attachment with Php mail function

step1-create a test2.php  Demo- Send multiple attachment with PHP MAIL Demo2- SEND multiple attachment WITH PHP MAIL FUNCTION(AJAX JQUERY) <center> <form id="frmEnquiry" action="mail2.php" method="post" enctype='multipart/form-data'>   <h2>Send Multiple Attachment With Php Mail Function</h2><br>     <div id="mail-status"></div> <div id="loader-icon" style="display: none;">     <img src="LoaderIcon.gif" /> </div>     <div>         <input             type="text" name="userName" id="userName"             class="demoInputBox" placeholder="Name" required>     </div>     <div>         <input type="text" name="userEmail" id="userEmail"             class="demoInputBox" placeholder="from email"...

Import image from URL with Ajax,Jquery and Php

Demo- Import Image From URL Download code- Import image fom url sand save in database and directory Step 1-create a index.php file </body> </html> <style> #uploadForm {border-top:#F0F0F0 2px solid;background:#FAF8F8;padding:10px;} #uploadForm label {margin:2px; font-size:1em; font-weight:bold;} .demoInputBox{padding:5px; border:#F0F0F0 1px solid; border-radius:4px; background-color:#FFF;} #progress-bar {background-color: red;height:20px;color: #FFFFFF;width:0%;-webkit-transition: width .3s;-moz-transition: width .3s;transition: width .3s;} .btnSubmit{background-color:#09f;border:0;padding:10px 40px;color:#FFF;border:#F0F0F0 1px solid; border-radius:4px;} #progress-div {border:black 1px solid;padding: 5px 0px;margin:30px 0px;border-radius:4px;text-align:center;} #targetLayer{width:100%;text-align:center;} </style> <script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></scri...

How to Rename File Before Upload In Php

Create a upload name folder and index.php file Rename image while uploading in php <form action="" method="post" enctype="multipart/form-data"> <input type="file" name="myfile" required/> <br>new name <input type="text" name="newname" placeholder="name" required> .ext <input type="text" name="ext" placeholder=".ext" required><br/> <input type="submit" name="submit" /> </form> <?php if(isset($_POST['submit'])){ $name=$_FILES['myfile']['name']; // name of the upload file $type=$_FILES['myfile']['type'];// type of the upload file $size=$_FILES['myfile']['size'];// size of the upload file $newname=$_POST['newname'];//renamefile name $ext=$_POST['ext']; $x=$newname.$ext; $tmp_name=$_FILES['myfile...

How to Upload Single and Multiple File with Php

For single file upload Step1- create a index.php file and upload folder <?php if(isset($_POST['submit'])){ echo "clicked"; $name= $_FILES['myfile']['name'];// FIRST STEP IS GIVE NAME OF UPLOAD FILE $tmp_name=$_FILES['myfile']['tmp_name'];//SECOND STEP IS GIVE TEMPORARY NAME OF  UPLOAD FILE $store="upload/".$name;//THIRD STEP IS CREATE A STORE LOCATION OF FILE move_uploaded_file($tmp_name,$store);//FOTH STEP UPLOAD FILE ?> <img src="<?php echo $store; ?>" width="100px" height="100px" /> <?php } ?> <html> <head> </head> <body> <form action="" method="post" enctype="multipart/form-data"> <input type="file" name="myfile"/> <input type="submit" value="upload" name="submit"/> </form> </body> ...